In Java why we write public static void main(String args[])
why not main()?
Answer Posted / abhi
it is bcoz...
since MAIN is also a method and it is not called by creating instance it is declared STATIC so that it is invoked by the JVM without creating instance.....
PUBLIC because it is called by the jvm which is not is not a part of the class directly.....
VOID because it does not return any value.....
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
When parseint method can be used?
Why is serialization required?
What are the fileinputstream and fileoutputstream?
What is the symbol for average?
What is the difference between static binding and dynamic binding?
is there a separate stack for each thread in java? : Java thread
Is java developer a good career?
Why does it take so much time to access an applet having swing components the first time?
Is alive and join method in java?
When should I use singleton pattern?
What are advantages of using Java?s layout managers than windowing systems?
What is literal example?
what is the major difference between linkedlist and arraylist in java?
What are the important features of Java 11 release?
What is the major advantage of external iteration over internal iteration?