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 isan abstract class and when do you use it?
Explain try and catch keywords in java?
What is multiple inheritance? Is it supported by java?
What is loop in java?
How do you remove spaces in java?
Why does my function print none?
Which keyword specify that a variable is effectively final ?
Can we sort arraylist in java?
How we can declare a static variable?
What is a predicate method?
Can this keyword be used to refer static members?
Can we make the abstract methods static in java?
What are the basic control structures?
How do you execute a thread in java?
Explain heap sort?