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

Can we override the static method?

966


What is the difference between multiple processes and multiple threads?

1115


Difference between class#getinstance() and new operator ?

1140


What is field name?

951


What are examples of modifiers?

1016


How to use Media tracker Class.

1082


What is command line argument in java?

1078


What is consumer in java?

921


In which language java is written?

926


What is a parent class in java?

960


Explain the importance of thread scheduler in java?

955


What is function declaration?

916


What does nextint () do in java?

935


How many bits is size_t?

928


Is it possible to use string in the switch case?

994