Is there is any error if you have multiple main methods in
the same class?
Answer Posted / nisha
The compilation error, if you have multiple main
methods in the same class.
Error like :java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: Uncompilable source
code - main(java.lang.String[]) is already defined
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can we override the static method?
What is the difference between multiple processes and multiple threads?
Difference between class#getinstance() and new operator ?
What is field name?
What are examples of modifiers?
How to use Media tracker Class.
What is command line argument in java?
What is consumer in java?
In which language java is written?
What is a parent class in java?
Explain the importance of thread scheduler in java?
What is function declaration?
What does nextint () do in java?
How many bits is size_t?
Is it possible to use string in the switch case?