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

Write 7 differences between "Public" function and
"Private" function?

Answer Posted / shankar

1. Public Functions are available to any member of the
class and Object of the class, while private functions are
available to member functions of the same class.

2. Public functions can be inherited, but private can't.

3. By making function Private we implement encapsulation,
but with public method we don't.

4 Private functions are not available in interfaces.
Interfaces only contains Public methods.

5. Private Method though it declare Static will not be
available By using Class Name.

7. Private functions can never be declared as abstract but
Public functions can be.

6. Public functions are defined using 'Public' keyword and
Private functions are defined using 'Private' keyword.

Is This Answer Correct ?    52 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is purpose of inheritance?

1097


What is encapsulation and abstraction? How are they implemented in C++?

1125


What are main features of oop?

1118


What is the problem with multiple inheritance?

1155


Is html an oop?

1053


How do you define social class?

1058


Why interface is used?

1012


which feature are not hold visual basic of oop?

2188


what's the basic's in dot net

2177


Why is abstraction needed?

1030


What are the two different types of polymorphism?

1140


Why is encapsulation used?

987


Which type does string inherit from?

1096


What are the benefits of polymorphism?

1261


What is polymorphism explain its types?

1152