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

What are the approaches that you will follow for making a program very efficient?

1061


What is string :: npos?

1069


Difference between character constant and string constant in java ?

1008


Explain aggregation in java?

971


Why bytecode is called bytecode?

1182


What is isa relationship?

1035


When should you use arraylist and when should you use linkedlist?

923


What is currentthread()?

985


How do you convert an int to a double in java?

1052


What is the difference between Grid and Gridbaglayout?

1229


Which collection is best for sorting in java?

1116


State the difference between strings and arrays.

1228


Why stringbuilder is not thread safe?

1011


What is the use of runnable interface?

1161


Is there any limitation of using inheritance?

1059