Появилась ошибка Main method not found
Появилась вот эта ошибка:
Main method not found in class Echo, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application
Что не так с кодом?
class Echo{
int count =0;
void hello(){
System.out.println("Hellooooooo...");
}
}
class EchoTestDrive{
public static void main(String[] args){
Echo e1,e2;
e1=new Echo();
e2=new Echo();
int x=0;
while(x<4){
e1.hello();
e1.count=e1.count+1;
if(x==4){
e2.count=e2.count+1;
}
if(x<5){
e2.count=e2.count+e1.count;
}
x=x+1;
}
System.out.println(e2.count);
}
}