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
What is canonical name in java?
What is a function argument in java?
What is the size of a string in java?
Is string thread safe in java?
What is final class?
Define array. Tell me about 2-D array.
What is return code?
What is basic syntax?
What is the difference between applet and application?
What do you understand by access specifiers in Java?
What does arrays sort do in java?
What will happen if static modifier is removed from the signature of the main method?
What is jit compiler in java?
Can you call a method on a null object?
What is anti pattern in programming?