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
Where and how can you use a private constructor?
Write a program to reverse a number in java?
How does java pattern compile work?
Can private class be inherited in java?
Is null function in java?
what is meant by Garbage collection?
What are bind parameters?
Does isempty check for null?
How can we access some class in another class in java?
what is deadlock? : Java thread
Explain listiterator and methods in listiterator?
What is abstract class? Explain
Is nullpointerexception checked or unchecked?
What is the use of accept () method in java?
What is :: operator in java 8?