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 the relationship difference the canvas class and the graphics class?
What will be the default values of all the elements of an array defined as an instance variable?
Can we write a class without main method in java?
List some important features of java 10 release?
Can you extend singleton class?
Will minecraft java be discontinued?
What is getkey () in java?
Explain the different forms of polymorphism?
What are inbuilt functions in java?
Can we extend a class with private constructor?
From the two, which would be easier to write: synchronization code for ten threads or two threads?
What is a data structure java?
What is mean by exception?
What is included in core java?
Can we convert integer to string in java?