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
Say any two properties in beans?
What are three advantages of using functions?
What is unicode full form?
Describe the process as to how substring() methodology mechanisms in java.
What is the use of default method in interface in java?
How to call one constructor from the other constructor ?
How will you reverse a singly-link list?
What is the difference between yielding and sleeping in java programming?
What is a boolean output?
Define max and min heap, also the search time of heap.
How is it possible for two string objects with identical values not to be equal under the == operator?
How do you convert int to char in java?
Can we access instance variables within static methods ?
What are the Main functions of Java?
What about main() method in java ?