In Java why we write public static void main(String args[])
why not main()?
Answer Posted / sreenu karampudi
public static void main(String args[])
When the class get loaded, it will execute the static main
() method. void as it does not return anything.
| Is This Answer Correct ? | 15 Yes | 49 No |
Post New Answer View All Answers
What is the importance of main method in Java?
why an outer class cannot be declared as private?
What do you know about java?
What is rule of accessibility in java?
What is the use of math abs in java?
What are local variables?
Explain the importance of finalize() method.
Is minecraft 1.15 out?
Why wait(),notify(),notifyAll() methods defined in Object class althought we are using in only threads.
How java uses the string and stringbuffer classes?
Explain java code for recursive solution's base case?
How do you get length in java?
why Java does not support multiple inheritances?
Can we call thread start () twice?
What is the difference between && and & in java?