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
Can we create more than one object singleton class?
How can the checkbox class be used to create a radio button?
How big is a boolean?
What is Java Annotations?
Difference between doublesummarystatistics, intsummarystatistics and longsummarystatistics ?
How do singleton patterns work?
What is n in java?
What must a class do to implement an interface in java programming?
How do you calculate roots in java?
Where are the local variables stored?
What is the size of an array?
What are the disadvantages of object oriented programming?
can used Protected Class outside Function.?
Explain purpose of sleep() method in java?
What is a buffer in computer?