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

Answer Posted / bindhu

The compilation error " main(lava.lang.String[]) is
already defined " will occur when we use have multiple main
methods in the same class?

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?

767


What is the collections api?

577


What is an enumeration?

572


Explain about map interface in java?

595


Is sizeof a preprocessor?

542






What is the simpletimezone class in java programming?

538


When is an object subject to garbage collection?

588


What variables are stored in stack?

531


How many ways can we create singleton class?

506


List down the methods and interfaces of collection class in java.

548


How do you add spaces in java?

516


What is the applet security manager, and what does it provide?

544


What is the benefit of inner / nested classes ?

527


Can you access the private method from outside the class?

514


What is the use of predicate in java 8?

494