Why do we use public static with the main function in Java?
Answer Posted / shekhar chauhan
public static void main()- firstly, public which r used
globly access this method in our whole progam. and static
basically used for that we can used only one main method in
whole program.we can not create object that class. so we
make static main method.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Explain about exception propagation?
What is a protected class in java?
What is class and object in java?
What do you know about the garbate collector?
Can a vector contain heterogenous objects?
explain multi-threading in java?
What is singleton service?
Can you have two constructors in java?
What is a final class ?
What are the types of casting?
If we don’t want some of the fields not to serialize how to do that?
Why can't you declare a class as protected?
What are the different conditional statements?
What are recursive functions? Give some examples?
what is a green thread? : Java thread