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

class test { private static void main(String []adsf) { } } explain me that the above code is error or exception

3 Answers  


What are basic data types?

0 Answers  


How to create a fecelet view?

0 Answers  


What is default constructors?

0 Answers  


What is the difference between a static and a non-static inner class in java programming?

0 Answers  






Can a list be null in java?

0 Answers  


How is garbage collection controlled?

0 Answers  


What is a private class in java?

0 Answers  


How many types of flags are there?

0 Answers  


Is java se open source?

0 Answers  


How is hashcode calculated in java?

0 Answers  


What is static method with example?

0 Answers  


Categories