what is abstract class ?
when is used in real time ?
give a exp
Answer Posted / ramakrishna yechuri
An Abstract class ia class which consists at least one
abstract method(in complete method).
Advantage is the user can implement the method body as per
his require ment.
ex: connect(){} ,I implement to conncect to oracle
database,u implement to conncet to sybase,my friend
implement this method to connect to oracle db. same connect
method acting in different forms (polymorphisim).
Note: Always Interfaces is better than Abstract class,becoz
Programming to Interface is better than programming to
classes.
To avoid dependency Injection problems.(spring).
| Is This Answer Correct ? | 14 Yes | 4 No |
Post New Answer View All Answers
How do you answer polymorphism?
What is inheritance write a program to show use of inheritance?
What is the problem with multiple inheritance?
What is abstraction oop?
What is encapsulation oop?
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< Can private class be inherited? What is and I oop mean? What are the types of abstraction? Why do we use polymorphism in oops? What does and I oop mean? What is object in oop? What is inheritance in oop? What is destructor example? What is abstraction in oop?