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 / diya verma

Public : it is access modifier and also known as visibility mode.It is used to declare public members in a class.It is also used in inherit the derived class which shows public member of base class with the help of object of derived class in global scope.The public member can be accessed outside the class.

Private:It is access modifier and also known as visibility mode.It is used to accessed inside the class I.e the member of class is private.
1. All the public member will be private member of child class.
2.All the protected member will be private member of child class.
3.Private member can't be inherit.

Protected:It is access modifier and also known as visibility mode.
1.All public members will be protected member of child class.
2.All the protected member will be protected member of child class.
3.Private member can't be inherit.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is overriding in oop?

992


What is basic concept of oop?

1104


What is the fundamental idea of oop?

1078


what is the drawback of classical methods in oops?

3315


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

2095


What is difference between inheritance and polymorphism?

975


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

2332


What is abstraction and encapsulation?

941


Can you inherit a private class?

1057


What are the three main types of variables?

1062


Write a c++ program to display pass and fail for three student using static member function

3323


Can we create object of interface?

1063


Why multiple inheritance is not possible?

1016


What is encapsulation with real life example?

975


What is data binding in oops?

1023