where u use Abstraction and Interface in real time

Answer Posted / praveen

If a user want to interact with my application he need an
interface. With the interface the user can access the
specific methods of a class that implemented the interface.
For example user want to call a method. He already know the
specific class implemented that interface, then he can call
the method through reference object.

Abstract class is used whenever a user restricted to
inheritance but not taking instance of a class or if any
methods are there that should be implement by the user.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the kinds of polymorphism?

842


What is purpose of keyword void?

814


Is it possible to compare various strings with the help of == operator?

768


Can we declare main () method as non static?

725


What are multiple inheritances?

849


What do you mean by aggregation?

841


What is sortedmap interface?

785


What is a string what operation can be performed out with the help of a string?

761


Explain about automatic type conversion in java?

838


What is the technique adopted to create an immutable class?

792


What is the difference between Java1.4 and Java1.5

2074


What does += mean in java?

803


What is t in parametric equations?

760


What are java methods?

818


Does collectionutils isempty check for null?

1128