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...

Why does java not allow multiple public classes in a java file ?

Answer Posted / rahul

java does not support multiple public classes because of there are only one main method to define......and we can not have multiple main methods in a same class....and we know that java code will always save as the name of class name in which main method are define......

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is bmg file and how to create that files?what will it contailn?

2343


What kind of variables a class can consist of?

1096


What is string value?

1154


When is the arraystoreexception thrown?

1011


How does compareto work in java?

1031


How do you get the length of a string in java?

986


Why is stringbuffer thread safe?

1041


What is the synchronized method modifier?

1195


What is bifunction in java?

1181


What is a bufferedreader?

1082


which class is the wait() method defined in? : Java thread

936


what is meant by HQL?

1056


How do I get the | symbol on my keyboard?

1078


Difference between overriding and overloading in java?

1060


What are the application of stack?

911