Follow Us
Contribute
  • Register

The method someMethod() is undefined for the type SomeClass

+2 votes

This error message appears in java when the method is not defined in that class. Also another common cause of this error is forgetting the new keyword when calling the constuctor of the class.
SomeClass variable = SomeClass();If you try to compile the above code, java will definitely throw this error message.

requested 3 years ago by errorbase (170,010 points)
edited 3 years ago by onur

1 Solution

+1 vote

Check the method in the error message if it is defined or not. Also do not forget to add the new keyword for the constructors.
SomeClass variable = new SomeClass();

solved 3 years ago by errorbase (170,010 points)
edited 3 years ago by onur

Related errors