In Java why we write public static void main(String args[])
why not main()?
Answer Posted / amardip sabale
we write public static void main() because
public:for access of main function all over the program
static:main is also one type of method,and for calling this
method while running our program without creation of any
object
void:because it is not return anything
String args[]:because when we run our program then always
we pass at least two command line arguments(java and
program name)for collecting them we have to write it
*THANKS*
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Mention a package that is used for linked list class in java.
What modifiers may be used with an inner class that is a member of an outer class in java programming?
What is boolean logic?
Explain the importance of finalize() method.
What are the 4 types of research methods?
What is anagram number?
Can you sort a list in java?
What are the three types of design patterns?
Why webdriver is an interface?
What is array command?
How does a for loop work?
What is the biggest integer?
What is an infinite loop?
What is a class variable?
What is a java object and java application?