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 nested class in java?

1164


How do you compare arrays in java?

947


What is ordered map in java?

986


What is the scope or life time of instance variables?

1104


How can constructor chaining be done by using the super keyword?

1090


What is boolean keyword in java?

1122


What is the size of boolean variable?

1070


Find the value of a specified element of the array arr[i] where 0 <= i <= n-1

974


What state does a thread enter when it terminates its processing in java programming?

1031


Is array size fixed in java?

975


What is the flag in java?

1042


In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?

1047


what is a thread pool in java and why is it used?

996


What does next mean in java?

963


Why arraylist is used in java?

1064