+ 1

Please help me to solve this error message for the example program hello world

the error msg is as follows: Main method is not static in class myclass

17th Oct 2016, 4:38 PM
vikky vikky
vikky vikky - avatar
2 Réponses
+ 3
That's in Java, I suppose? Make sure that the main method is static. public class myclass { public static void main(String[] args) { System.out.println("Hello world!"); } }
17th Oct 2016, 5:20 PM
Zen
Zen - avatar
0
I had written it like that only. by the way i'm using eclipse.
18th Oct 2016, 3:20 AM
vikky vikky
vikky vikky - avatar