Compiler Error J0242

Cannot make static call to non-static method 'identifier'

The compiler detected that a method was called by using the static method call syntax '<classname>.<method>', but the method is not a static method. Change the method call to use an instance of the class that contains the method instead of the class name itself and compile again.

The following example illustrates this error:

public class Simple{
   public void method1(){
      //do something here
   }
}

class NotSimple{
   public void methodx(){
      Simple.method1();
      //error: 'method1' is not a static method
   }
}