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 is a super method?
What is difference between length and length() method in java ?
What is an abstract class and what is it’s purpose?
What are the java ide's? Explain
Is main a function?
Can we use both this () and super () in a constructor?
Can an interface have a constructor?
What is difference between hashset and hashmap in java?
Describe what a thread-local variable is in java?
What is difference between float and double?
How will you load a specific locale?
Can final class have constructor?
is it possible to instantiate the math class?
What do you mean by JVM?
What is method and methodology?