problem!!!
I have written the following code from a book :
class John {
String color;
String sex;
boolean hungry;
void feedJohn() {
if (hungry==true) {
System.out.println("Yum -- a peasant!");
hungry=false;
} else
System.out.println("No, thanks -- already ate.");
}
void showAttributes() {
System.out.println("This is a "+sex+" "+color+" John");
if (hungry==true)
System.out.println("The John is hungry.");
else
System.out.println("The John is full.");
}
}
The error that i am getting is :
Exception in thread "main" java.lang.NoSuchMethodError: main
What is the problem?
I am usin JCreator

