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 current version of java?
Can a top level class be private or protected?
Write a java program to print fibonacci series?
Can we override the private methods?
What is the difference between a method and a procedure?
How is Object Oriented Programming different from Procedure Oriented Programming?
What is a class variable?
Define iterator and methods in iterator?
Why does java have different data types for integers and floating-point values?
What is java Applet?
How do you create an array in java?
Which containers use a flowlayout as their default layout in java programming?
How do you use compareto?
What is a flag and how does it work?
What is a string token?