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

Explain the differences between public, private, protected
and static?

Answer Posted / manne ranjith

public-->inherite the protected members as preotected in
drived class and pubic members wiull be public in derived
class

protected--->pubic and protecated members of the base class
will become protected in derived class

Private-->pubilc and proteacted members will become private
in derived class

static--->Method is defined by static cannot access non-static
members or fields of that class. But non-static members can
access static fields or methods.

Is This Answer Correct ?    28 Yes 32 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the covariant return type?

1085


How many inner classes can a class have?

1041


Tell us something about different types of casting?

918


Does windows 10 need java?

1042


how does the run() method in runnable work? : Java thread

914


what do you understand by synchronization? : Java thread

984


What are the advantages of java inner classes?

1066


What is an enumeration?

1061


What is string in java with example?

1018


What access modifiers can be used for class ?

1019


Is void a keyword in java?

1012


Why can't we use static class instead of singleton?

936


Explain the importance of finally over return statement?

1038


What are three types of loops in java?

1130


Can a final variable be initialized in constructor?

969