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


Please Help Members By Posting Answers For Below Questions

What are constructors in oop?

596


What is polymorphism in oop example?

517


How do you define a class in oop?

628


Why we use classes in oop?

583


What causes polymorphism?

577






What is oops concept with example?

580


can inline function declare in private part of class?

3660


any one please tell me the purpose of operator overloading

1967


What is polymorphism what is it for and how is it used?

576


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1395


Why is oop better than procedural?

606


Is this job good for future? can do this job post grduate student?

1694


What are the features of oop?

641


Why is polymorphism used?

586


What does and I oop mean in text?

625