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
What is JDBC Driver interface?How can you retrieve data from the ResultSet
Explain creating threads by extending thread class ?
How do you detect memory leaks?
How many bytes is a string?
What is tree node in java?
Why do we need singleton class?
Can we declare an array without size in java?
Explain about oops concepts.
Which sorting algorithm is in place?
Explain about the performance aspects of core java?
What is difference between this and super keyword?
What is jrmp?
What is the use of object and class classes?
what is singleton in java?
What are the 4 types of characters?