Why do we use public static with the main function in Java?
Answer Posted / ankit
public is written so that it can be called from outside and
static is written because main is called before the creation
of any object and for static methods object is not required.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is stringbuffer in java?
Is zero a positive integer?
Is void a wrapper class?
What state does a thread enter when it terminates its processing in java programming?
What are the main differences between the java platform and other platforms?
How to display arraylist values in java?
What is the difference between abstraction and encapsulation?
What is double parsedouble in java?
What is the purpose of default constructor?
What does s mean in regex?
What are the advantages of user defined functions?
How do constructors use this() and super()?
What is the main function in java?
What is bean? Where it can be used?
Why is singleton class used?