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 the meaning of I ++ in java?
What is the purpose of format function?
How do you sort a set in java?
What is the use of singleton?
Can a class be a super class and a sub-class at the same time? Give example.
When can an object reference be cast to an interface reference in java programming?
what is use of functional interface in java 8?
Why unicode is important?
What type of variable is error flag?
explain copyonwritearraylist and when do we use copyonwritearraylist?
What is meant by attribute?
What is java virtual machine and how it is considered in context of java’s platform independent feature?
What is string immutability?
What is the difference between serializable and externalizable interfaces?
How many threads can java run?