In Java why we write public static void main(String args[])
why not main()?
Answer Posted / sudheer nath
public means the main functiio can be accessible outside the class the jvm remain outside the class so we add the public visiblity mode.
static means the compiler automatically called the main ()functio without creating its instance or object.
void is the return type of the main function means main() does not return any kind of values to its caller means jvm.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is flag in python?
Define packages in java?
Explain constructors and types of constructors in java.
Can we create an object of private class?
Why is singleton class used?
What does += mean in java?
What is jvm? How its run?
What do you mean by a JVM?
What is io stream in java?
What is the internal implementation of set in java?
What are the java ide's? Explain
Explain different forms of polymorphism?
How hashset works internally in java?
What is static data type in java?
How many bits is size_t?