where u use Abstraction and Interface in real time

Answers were Sorted based on User's Feedback



where u use Abstraction and Interface in real time..

Answer / 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

where u use Abstraction and Interface in real time..

Answer / narasimha

Abstraction is used in framework and interfaces are used in
specification

Is This Answer Correct ?    4 Yes 0 No

where u use Abstraction and Interface in real time..

Answer / teja

When ever there is need of having same common features
among the subclasses of of super class we have to go for
AbstractClass,
When ever there is no common features for subclasses of
super class we have to go for interface

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the meaning of immutable regarding string?

0 Answers  


Java support what type of parameter passing ?

7 Answers   Wipro,


Write a java program for binary search?

0 Answers  


What is a java object and java application?

0 Answers  


what are the difference between Java and .Net?

5 Answers  


What is covariant return type?

0 Answers  


What are assembly attributes?

0 Answers  


How the elements are organized in GridBagLayout?

1 Answers  


Which of the following classes will have more memory allocated?

0 Answers  


Explain the difference between extends thread vs implements runnable in java?

0 Answers  


Which class is used by server applications to obtain a port and listen for client requests?

0 Answers  


Explain the difference between arraylist and linkedlist in java?

0 Answers  


Categories