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
Where is jre installed?
Why string is immutable or final in java
How can we create a synchronized collection from given collection?
What is string array?
What is a type parameter in java?
Is string passed by reference in java?
What is command line argument in java?
How many ways can we create singleton class?
What is constructor chaining and how is it achieved in java?
Can bool be null?
What is the difference between normal report & matrix report?
how to prepare for IT Officers Interview in Banks
What is the difference between stored procedure & function?
How can you add and remove nodes in jtree?
What is the final class?