why we are declare the function in the abstract class even
though we are declaring it in Derived class?



why we are declare the function in the abstract class even though we are declaring it in Derived cl..

Answer / vishal

Abstract class is nothing but placeholder for other classes
ie subclass.It defines common shared behavior in abstract
classes and if we need to override we need to define in its
subclass else we can use shared behavior in base class.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More OOPS Interview Questions

Why it is called runtime polymorphism?

0 Answers  


Why is polymorphism important in oop?

0 Answers  


Given two strings like x=?hello? and y=?open?, remove any character from string x which is also used in string y, thus making the result x=?hll?.

13 Answers   IBM,


what is function overloading..?

4 Answers  


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

0 Answers   CAT,


When is a memory allocated to a class?

11 Answers  


suppose A is a base class and B is the derved class. Both have a method foo which is defined as a virtual method in the base class. You have a pointer of classs B and you typecast it to A. Now when you call pointer->foo, which method gets called? The next part of the question is, how does the compiler know which method to call?

3 Answers   EA Electronic Arts,


Why do we use oop?

0 Answers  


What is the point of polymorphism?

0 Answers  


Which is not an object oriented programming language?

0 Answers  


Explain polymorphism? What r the types of polymorphism? pls give examples?

4 Answers   HCL,


Can java compiler skips any statement during compilation time?

0 Answers  


Categories