what is purpose of writting public static void main(Strind
arg[]) in java..?
Answer Posted / sahithi
Main method is entry point of our program.It is the method
executed when we run java program.
The method is "public" becozit should be accesible to jvm
to begin execution of program.
It is "static" becoz it should be available for execution
without an object instance..
String args[] are used to signify that user may pass
parameters to java prgm in commandline
| Is This Answer Correct ? | 19 Yes | 2 No |
Post New Answer View All Answers
What is e in java?
What is private public protected in java?
What is the set interface in java programming?
What is lastindexof in java?
Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?
What is the size of string?
What is double parsedouble in java?
What is the use of a copy constructor?
Which class is used by server applications to obtain a port and listen for client requests?
What is the default size of arraylist in java?
How will you communicate between two applets?
Why main function is static?
List some oops concepts in java?
Which package is always imported by default?
What are thread groups?