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 |
Is final static java?
Why is core java important?
Hi buddy, well i got that there is always a default constructor with abstract class. OK. But why not with interface? Thanks in advance.
Name the package that always imported by default?
What is string syntax?
What is the difference between interface & abstract class?
Why scanner is used in java?
Differece between class and generic class?
Why do we need hashset in java?
What are the data types supported by java? What is autoboxing and unboxing?
How many functional interfaces does java 8 have?
What's the difference between comparison done by equals method and == operator?