Why do we need public static void main(String args[])
method in Java...?
Answer / 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 |
What are the different types of java?
What is the frontend and backedn in Java?
Explain about method local inner classes or local inner classes in java?
What are daemon Threads in java?
What is type casting?
Differentiate between == and equals().
Difference between keyword and identifier.
Difference between static synchronization vs. Instance synchronization?
What is variable explain with example?
Explain how to convert any java object into byte array.
What is api in java?
Is it possible to use string in the switch case?