In Java why we write public static void main(String args[])
why not main()?
Answer Posted / suresh.t.c
public static void main(String arg[])
public for accessing all object
static for to call main method without instance
void main for not returning values for avoid compilation errors
String arg[] is ,in input takes as strings so takes multiple inputs declared String with array of arg[]
| Is This Answer Correct ? | 14 Yes | 3 No |
Post New Answer View All Answers
What is break and continue statement?
What's the access scope of protected access specifier?
What are the 7 types of characters?
How do you identify independent and dependent variables?
Can classes declared using the abstract keyword cab be instantiated?
Can private method static?
Why is it called a string?
How to display arraylist values in java?
what is singleton in java?
What do you mean by access modifier?
What is the most important feature of java? What is an interface?
What is reverse function?
What is use of static method?
What does localhost mean?
What is hashtable and explain features of hashtable?