Compiler Error J0049

Undefined name 'identifer'

The compiler detected a reference to a class, method, or variable that does not exist. Examples of when this error can occur include:

Ensure that the reference to the class, method, or variable displayed in the error message is correct and compile again.

The following example illustrates this error:

import java.io.bogus; // error: unknown class name
   
public class Simple {
   
   public int method1(){
      return novar1;
      //error: 'novar1' does not exist
   }
   public void method2(){
      NotSimple nt = new NotSimple();
      np.methodx();
      //error: the object reference 'np' should be 'nt'
}

class NotSimple{
   public void methodx(){
      //do something meaningful here
   }
}