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 are abstract classes and anonymous classes?
What is nextint java?
How many bytes is 255 characters?
How to convert string to char and vice versa?
What is abstract class constructor called?
What is the use of flag?
How hashmap works in java?
How does linkedlist work in java?
What are the features in java?
What is an class?
How do you call a reference in java?
What is a static class in java?
What is difference between core java and java ee?
What are the 7 types of characters?
Which package is used for pattern matching with regular expressions?