adspace
I get an exception if I remove the static modifier from main?
Answer Posted / Amitesh Srivastava
Yes, removing the static modifier from the main method in Java will result in a compile-time error. The main method must be declared as static so that it can be called by the JVM.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the resourcebundle class?
What is the locale class?
Are jvm’s platform independent?
What if I write static public void instead of public static void?
What do you understand by casting in java language? What are the types of casting?
What is the first argument of the string array in main method?
How does java handle integer overflows and underflows?
Can we extract main method from another class?
what is reflection api? How are they implemented?
What is the java api?