Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Is void a return type?

963


What is consumer interface?

999


Can private class be extended java?

1027


What are the main uses of the super keyword?

964


How to display arraylist values in java?

1009


what is optional in java 8?

1061


What is variable argument in java?

1004


What is a line separator in java?

980


Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?

954


Are there structures in java?

968


How use .contains in java?

1174


What is final keyword in java?

1021


What is api in java?

980


Explain the difference between serializable and externalizable in java?

1059


How do you delete a list in java?

950