Why do we need public static void main(String args[])
method in Java...?
Answer Posted / shadow
We need
• public: The method can be accessed outside the
class / package
• static: You need not have an instance of the class
to access the method
• void: Your application need not return a value, as
the JVM launcher would return the value when it exits
• main(): This is the entry point for the application
If the main() was not static, you would require an instance
of the class in order to execute the method.
....!
$HADOW
| Is This Answer Correct ? | 14 Yes | 0 No |
Post New Answer View All Answers
How are observer and observable used in java programming?
How can we break singleton in java?
List two java ide’s?
What is the difference between declaration and definition in java?
Is null function in java?
What is the purpose of final keyword and when to use it?
What is meant by oops concept in java?
What is data type in computer?
What is skeleton and stub? What is the purpose of those?
What happens when I use / and % with a negative numerator?
What is super in java?
How do you break a loop?
What are methods?
Can we serialize arraylist in java?
What is the difference between a field variable and a local variable?