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 / pranab dutta

No the program fails to compile, if you have multiple main
methods in the same class. The compiler says that the main
method is already defined in the class.

Is This Answer Correct ?    18 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of generics? When was it added to the Java development Kit?

1021


How a variable is stored in memory?

990


What are java annotations?

1167


Which package is imported by default?

1082


Why do we create public static method in java?

1116


When is the finally clause of a try-catch-finally statement executed?

1074


what is meant by Byte code concept in Java?

1071


What is the default value of float and double datatype in java?

1015


How do you create immutable object in java?

1055


Does java allow overriding static methods ?

1118


What is final method in java?

1037


What is a numeric literal?

1085


What is the difference between post and put?

1068


Why generics are used in java?

1057


Can a class have multiple superclasses?

1170