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 lastindexof in java?
What is the default value of byte datatype in java?
what is the constructor and how many types of constructors are used in java?
Is math an abstract class in java?
What is a method signature java?
How do I find and replace in word?
What are meta-annotations?
What is a blocking method in Java?
What is Session reduplication and how its done?
What is the purpose of the System class?
Why is singleton class used?
Explain about the performance aspects of core java?
What is the difference between iterator and enumeration ?
What is the purpose of the runtime class in java programming?
What are data types in oop?