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

How can you set an applet’s height and width as a percentage?

0 Answers  


What is time complexity java?

0 Answers  


How can I debug the Java security exceptions and AccessControlExceptions?

0 Answers   IBM,


when System.out.println("") is executed what happens in the back ground?

2 Answers  


How to connect to a remote database using Applet?

0 Answers  






Does isempty check for null?

0 Answers  


Explain the relationship between the Canvas and Graphics class?

1 Answers  


what is an anonymous class?

6 Answers   TCS,


Explain some best practices you would apply while using collection in java?

0 Answers  


Which types of exceptions are caught at compile time?

0 Answers  


how many ways to create Thread and which one is good? runnable interface ot Thread class?

3 Answers   Satyam,


What is assembly used for?

0 Answers  


Categories