Possible Duplicate:
calling non-static method in static method in Java
Is it possible to call a non-static method from a static method? The non-static is located in another class and it have to be non-static.
public static void start() {
CheckConnection checkInternet = new CheckConnection();
if (checkInternet.isNetworkAvailable()) {
// Has internet Connection
} else {
// No Internet Connection
}
}
The code doesn't give any errors in Eclipse (Android 4.0.4) but if I run it my application freezes and closes.