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
What are the approaches that you will follow for making a program very efficient?
What is string :: npos?
Difference between character constant and string constant in java ?
Explain aggregation in java?
Why bytecode is called bytecode?
What is isa relationship?
When should you use arraylist and when should you use linkedlist?
What is currentthread()?
How do you convert an int to a double in java?
What is the difference between Grid and Gridbaglayout?
Which collection is best for sorting in java?
State the difference between strings and arrays.
Why stringbuilder is not thread safe?
What is the use of runnable interface?
Is there any limitation of using inheritance?