Why do we use public static with the main function in Java?
Answer Posted / deepak divvela
In the main function generally we are using
public static void main(String args[])
that means public is used for call method without being the
member of the class.
and static is used for to call method directly with no need
of the object creation.
| Is This Answer Correct ? | 3 Yes | 7 No |
Post New Answer View All Answers
What is method with example?
What is rmi and steps involved in developing an rmi object?
Explain how hashmap works?
What does a boolean method return?
List out five keywords related to exception handling ?
State the main difference between c++ and java?
What is the use of parse function in java?
Explain different types of thread priorities ?
Which class should you use to obtain design information about an object in java programming?
What is the symbol for average?
What is the default size of arraylist in java?
Can java object be locked down for exclusive use by a given thread?
How hashmap increases its size in java?
What is final variable?
What is the exception hierarchy in java?