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 volatile keyword in java

1077


Why string is immutable or final in java

1032


Is it possible for a yielded thread to get chance for its execution again?

899


Can we overload the constructors?

934


What will be the output of round(3.7) and ceil(3.7)?

1072


Why do we need autoboxing in java?

943


What is the finalize method do?

1053


What does void * mean?

967


can I implement my own start() method? : Java thread

939


Can we have return statement in finally clause? What will happen?

921


Is 0 an irrational number?

1008


What is the use of keywords in java?

942


What are operators and its types?

1008


Explain wrapper classes in java?

946


Why do we override tostring method in java?

904