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 |
Can a class have multiple subclasses?
What do you understand by garbage collection in Java? Can it be forced to run?
What class of exceptions are generated by the java run-time system?
Why is java not 100% pure oops?
What is the difference between a loader and a compiler?
What is ascii code?
What is JDK? Mention the variants of JDK?
What is the difference between Java1.4 and Java1.5
How are this() and super() used with constructors?
Explain the selection sort algorithm?
How to know the host from which Applet is originated?
How many digits is int32?