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
Write a program to print 15 random numbers using foreach of java 8?
Why is java logo a cup of coffee?
What is constant in programming?
What is bubble sort in java?
How do you declare a variable?
What is array and arraylist in java?
What are the different ways to handle exceptions?
What is cr keyboard?
Where are local variables stored?
How an object is serialized in java?
Differentiate storage classes on the basis of their scope?
Is empty list java?
What is finalize() function in java?
Is oracle java 11 free?
How do you initialize an arraylist in java?