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 the purpose of static methods and static variables?
What is boolean flag in java?
In which language java is written?
Name and explain the types of ways which are used to pass arguments in any function in java.
design an lru cache in java?
What is difference between an object and a class?
What exactly is java?
What is a pattern what is an anti pattern?
What are the types of collections in java?
What is complexity and its types?
What is tree node in java?
What is the difference between heap and stack memory?
What is hotjava?
What is the intersection and union methods?
What are the 4 types of characters?