+ 1
Problem: java.lang.NoSuchMethodException: main [class [Ljava.lang.String;] at java.lang.Class.getMethod(Class.java:2068)
The program says that there is no "main". How can I resolve this? Where should I put the main? https://code.sololearn.com/c5up3eMYFSa6/?ref=app
4 Respuestas
+ 4
You are free about where to put main method inside your class. You can put main in the beginning, before any other methods. Or as the last method after all the others.
Just be sure it has valid signature of main method and access specifier.
0
"Illegal start of expression" public void start()