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 unicode used for?

1165


What do you mean by global variable?

953


What is string literal in java?

1054


How can you make sure that your singleton class will always return single instance in multi-threaded environment?

1028


What are the important methods of java exception class?

1134


What is methods in java?

1008


Explain treeset?

1113


Can two objects have same hashcode?

1000


write a program that list all permutations of ABCDEF in which A appears before B?

2491


Are arrays primitive data types?

1186


Explain reverse a linked list recursive java solution?

986


How to instantiate member inner class?

1084


What is meant by design patterns?

1035


What are abstract methods in java?

1122


Is alive method in java?

983