Is there is any error if you have multiple main methods in
the same class?

Answer Posted / harathi

We can have multiple main methods with different
arguments.Compiler throws an error if we have a method
similar to public static void main(String args[])

Is This Answer Correct ?    21 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the functionability stubs and skeletons?

885


What is anagram word?

735


Explain a situation where finally block will not be executed?

759


What is hash code collision?

792


How are observer and observable used in java programming?

745


How will you initialize an Applet?

822


Is 9 a prime number?

642


What is style and indentation?

747


What does || mean in vectors?

689


Can a class be private?

693


Explain the difference between abstract classes and interfaces in java?

819


What does it mean that a method or field is “static”?

709


How use .contains in java?

880


What are namespaces in java?

726


What is the difference between Error, defect,fault, failure and mistake?

859