What is public, protected, private?

Answer Posted / prashanth

public,protected,private are access modifiers where public
is used for acess the methods and variables to unlimited
extent.
private:is used to access the variables upto the enclosing
region
protected:and it is limited to class itself or classes that
are derived

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

class type to basic type conversion

1839


What is overriding vs overloading?

587


What are the 3 principles of oop?

619


How do you achieve polymorphism?

618


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6155






Can we have inheritance without polymorphism?

617


What is overloading in oops?

598


what is the 3 types of system development life cycle

2435


What are the types of abstraction?

560


What is inheritance in oop?

604


which feature are not hold visual basic of oop?

1725


How long to learn object oriented programming?

565


What does and I oop mean in text?

625


What is oops and why we use oops?

573


Can destructor be overloaded?

601