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 default value of an object reference declared as an instance variable?

1052


what is thread? : Java thread

940


What is the purpose of return statement?

1020


What is called module?

931


Which number is denoted by leading zero in java?

1202


Explain about narrowing conversion in java?

967


Can interface be private in java?

953


What is a numeric format?

1023


What is a superclass?

1293


What is the difference between instanceof and isinstance?

995


What is float in java?

943


How many types of parsers are there?

969


Explain the difference between abstraction and encapsulation.

927


Name few "optional" classes introduced with java 8 ?

1079


What are keywords in programming?

960