Is there is any error if you have multiple main methods in
the same class?
Answer Posted / pranab dutta
No the program fails to compile, if you have multiple main
methods in the same class. The compiler says that the main
method is already defined in the class.
Is This Answer Correct ? | 18 Yes | 8 No |
Post New Answer View All Answers
Explain wait(), notify() and notifyall() methods of object class ?
what is thread? What are the high-level thread states? : Java thread
What is protected access modifier?
What is the simpletimezone class in java programming?
How do you stop a thread in java?
What is integer valueof?
What is static method with example?
What is e java?
How many bits is a string?
Can we execute a program without main?
Explain throw keyword in java?
What is the r character?
How to display arraylist values in java?
What does escaping a character mean?
Explain about doubly linked list