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 |
How do you compare arrays in java?
What is float in java?
What is difference between variable declaration and definition?
What is an Applet ?
What happens when heap memory is full?
What is a parameter example?
What is outofmemoryerror in java?
justify c is portable
Which Math method is used to calculate the absolute value of a number?
what is the use of custom tags? with example?
What is numeric data type?
How many types of thread in java? give the name