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
Which graphs are functions?
Is main a function?
Define a java class.
Is singleton set an interval?
Can java hashmap have duplicate keys?
Difference between static and dynamic class loading.
Write a program to print fibonacci series up to count 10.
What is tcp and udp?
What is the difference between serializable and externalizable interfaces?
What is the difference between static class and normal class?
Does constructor be static?
Can a string be null?
If an object is garbage collected, can it become reachable again?
write a program that list all permutations of ABCDEF in which A appears before B?
What is the finalize method do?