Why do we use public static with the main function in Java?
Answer Posted / ravikiran(aptech mumbai)
public means we are allowing the main method to be accessed
any where in the application.and is declared static because
jvm will look for the static one's once it completes the
loading the class.
| Is This Answer Correct ? | 11 Yes | 5 No |
Post New Answer View All Answers
What is difference between c++ and java ?
What is the point of polymorphism java?
What is parse method?
What are different access specifiers in java?
What are the advantages and disadvantages of object cloning?
How do constructors use this() and super()?
What is an example of a constant variable?
Can a vector contain heterogenous objects?
What is time complexity java?
Is there any way to skip finally block of exception even if some exception occurs in the exception block?
What is parameter example?
What is finalize method?
What is linkedlist in java?
Explain about public and private access specifiers?
Why main method is called first in java?