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
How many times finalize method will be invoked? Who invokes finalize() method in java?
Explain hashset and its features?
What is a numeric format?
How to make a write-only class in java?
How to instantiate static nested classes in java?
What is floor in java?
How can you write a loop indefinitely in java programming?
What are different access specifiers in java?
explain different ways of using thread? : Java thread
Does java arraylist maintain insertion order?
What is a stack class in java ?
Is map sorted in java?
What is class forname?
Explain the JDB in depth & command line.
What are untrusted applets?