In Java why we write public static void main(String args[])
why not main()?
Answer Posted / srinu
public static void main(String args[]) the meaning is
public:- Actually the main()method will be called by JVM .so
JVM is located other place so JVM will called by our main()
its public
static: with our object creation run our main()method so
thats its static
void:our main() method can't any return type thats its void
String args[]:. To get command_line arguments
| Is This Answer Correct ? | 7 Yes | 4 No |
Post New Answer View All Answers
What is the benefit of abstract class?
How to instantiate member inner class?
How many decimal digits is 64 bit?
What are facelets templates?
Can I override protected method in java?
What is the name of the java compiler?
Which is best ide for java?
Name few java util classes introduced with java 8 ?
What is java and its types?
What does the string method compareto () do?
Can sleep() method causes another thread to sleep?
Why can't we use static class instead of singleton?
What is final modifier?
Is list ordered in java?
Explain about map interface in java?