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

What do you mean by public, private, protected and friendly?

Answer Posted / achal ubbott

public means access to the object of the class, created in
outside world.

private and protected are almost the same, except the
difference that protected members are inheritable and thus
can be used by derived class. These can be accessed only by
the public function members of the class.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the real time example of encapsulation?

1007


Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

4080


write knight tour problem which is present in datastructure

2597


What is polymorphism and types?

1041


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

1241


Which method cannot be overridden?

1016


How to hide the base class functionality in Inheritance?

1090


Why is object oriented programming so hard?

1025


INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?

2146


Can destructor be overloaded?

978


Why is it so that we can have virtual constructors but we cannot have virtual destructors?

4807


What is overloading in oop?

959


How is class defined?

1071


What is purpose of inheritance?

1050


What is difference between data abstraction and encapsulation?

1032