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 are different oops concepts?

570


How many human genes are polymorphic?

570


What does sksksk mean in text slang?

1532


What is multilevel inheritance explain with example?

623


Can you name some types of inheritance?

639






Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

1618


What is purpose of inheritance?

643


What is use of overloading?

604


what's the basic's in dot net

1734


what is the 3 types of system development life cycle

2431


What is the importance of oop?

607


What is abstraction in oop?

631


Why is destructor used?

581


Advantage and disadvantage of routing in telecom sector

782


State what is encapsulation and friend function?

695