Can you inherit a private class?



Can you inherit a private class?..

Answer / Chandan Bhardwaj

No, private classes cannot be inherited because their visibility is restricted to the defining file. Inheritance can only occur with public and protected classes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

WHAT IS THE DIFFERENCE BETWEEN OBJECT BASED & OBJECT ORIENTD PROGRAMMING LANGUAGE.(GIVE AT LIST 4 PIONT)

1 Answers   TCS,


How long to learn object oriented programming?

1 Answers  


Which is faster post increment or pre increment ? and in which cases should u use either - to increase speed?

4 Answers   EA Electronic Arts,


what is object slicing

3 Answers   TCS,


What is overriding vs overloading?

1 Answers  


In multilevel inheritance constructors will be executed from the .... class to ... class

2 Answers   ABCO, TCS,


What is encapsulation selenium?

1 Answers  


What are properties in oop?

1 Answers  


Why multiple inheritance is not allowed?

1 Answers  


What are the two different types of polymorphism?

1 Answers  


What does and I oop mean?

1 Answers  


What is the default size allocated for array in the statement if size not specified " int a[] "

4 Answers   CTS,


Categories