In Java why we write public static void main(String args[])
why not main()?
Answer Posted / anil kumar.kommmisetty
In java we using a main method
i.e public static void main(String args[])
public > This is used for any where we can access.
static > This is used for constat and then first compile to
start.
void > should not return any value.
main > where to start the compile the program to tell.
String > it is a class.
args[] > this is used to tell the when ever u enter the
data that is treated as arguments to that program.
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
What does the string method compareto () do?
If you do not want your class to be inherited by any other class. What would you do?
What is a Transient Object?
Can a class have 2 constructors?
Mention a package that is used for linked list class in java.
Define Multiprogramming and Multiprocessing in java.
What is your platform’s default character encoding?
What is the difference between size and length in java?
Does constructor be static?
Can a class be a super class and a sub-class at the same time? Give example.
What is autoboxing in java?
Define immutable object?
What is the difference between method and means?
What ide should I use for java?
What is java and their uses?