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 an i/o filter?
What is callablestatement? How you can call stored procedure to pass in parameter?
Difference between arraylist and vector.
What is string in java? String is a data type?
What is the set interface in java programming?
What is OOP Language?
Is java call by value?
What is a conditional statement explain with example?
What is a static class in java?
What is definition and declaration?
What is the purpose of the finalize() method?
Can we have multiple classes in single file ?
What are the benefits of java?
Is break statement can be used as labels in java?
What does || mean in vectors?