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 is static import in java?
List some features of the abstract class.
What is java ceil?
Can an object be null?
Explain about method local inner classes or local inner classes in java?
How do you override a variable in java?
23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an
What are the advantages of unicode?
In a class implementing an interface, can we change the value of any variable defined in the interface?
What is the difference between overriding and overloading in OOPS.
Which is best ide for java?
What is the program development process?
What are the main uses of java?
Is it possible to override private or static method in java?
Differentiate storage classes on the basis of their scope?