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 only one Class is public in one file? Explain in
details. Thanks in Advance.

Answer Posted / gopi

The class main method is start with public . This is
starting of the program, compiler have to know where to
start the program to compile. so only one public is there to
avoid confusion. We also use the public method to interact
with the out side of the programs. Without using of the
public class it can't possible to interact.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between variable declaration and variable initialization?

1100


What are methods of a class?

1085


What is the difference between comparison done by equals method and == operator?

1068


Where can I find jdk in my computer?

1036


What is empty string literal in java?

1111


What are accessor methods in java?

1058


Is ++ operator is thread safe in java?

1010


What does compareto () do in java?

1059


Is empty list java?

975


What is a parameter example?

1031


How big is a pointer?

1081


Can constructor be inherited?

1092


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

1012


What are scalar data types?

1131


What is java object name?

1049