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 java abstraction with example?

539


What is the difference between throw and throws keywords?

562


What is executor memory?

501


Is there any limitation of using inheritance?

556


what is collatration?

2729






How many classes can any class inherit java?

495


Wha is the output from system.out.println(“hello”+null); ?

674


What is the core java?

526


Can you override a final method?

566


Why string is called as immutable?

510


What are reference variables in java?

580


When parseint method can be used?

525


What is string manipulation?

482


How can an object be unreferenced?

532


What is java used for on a computer?

493