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 / srikanth

No, there is no error if we have multiple main methods
in the same class.
because, while compiling we only specify one main method
name so, the JVM compiles it by taking the main method which
is specified by us while compiling.

Is This Answer Correct ?    3 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how come we know the object is no more used in the class?

6471


Which is faster call by value or call by reference?

943


How to make a write-only class in java?

1065


What is the default value of local and global variables?

1097


what is the difference between yielding and sleeping? : Java thread

970


What is the use of parse function in java?

986


How many bytes is a url?

986


Which category the java thread do fall in?

1006


What do you mean by JVM?

1082


What are heap memory and stack memory and what are memory tables.

990


What is boolean query?

986


What is the purpose of using java.lang.class class?

1016


What is an example of character?

1137


What is comparator in java?

1004


What does percent mean in java?

1030