What is public, protected, private?

Answer Posted / priya

public:public is a access specifier and it is used to access
class member through out the program .
private:private is a access specifier by default our variables are private when we didn't specify any data type for our variable.
protected:protected is a access specifier and its a immediate to derived class.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

is there any choice in opting subjects like 4 out of 7

1731


What is the important feature of inheritance?

635


What is persistence in oop?

673


What does enum stand for?

617


What is oops in simple words?

585






What is polymorphism and its types?

599


Can we override main method?

608


What is meant by oops concept?

614


Which type does string inherit from?

616


What is an advantage of polymorphism?

597


Which method cannot be overridden?

582


Write a program to sort the number with different sorts in one program ??

1922


What is destructor example?

597


What polymorphism means?

624


write a program to find 2 power of a 5digit number with out using big int and exponent ?

1897