what is difference between abstraction and interface?

Answers were Sorted based on User's Feedback



what is difference between abstraction and interface? ..

Answer / kavitha

Abstract classes define methods and interfaces declare
methods.
Interfaces declare methods without implementation.
Abstract classes are very much useful when there is a same
functionality across various classes.
Interfaces are useful for classes which varies in
functionality and with the same method signature.

Is This Answer Correct ?    12 Yes 0 No

what is difference between abstraction and interface? ..

Answer / chandra rekha

A class becomes an abstract class when it has atleast one
abstract method(a method with no definition).The major
difference between abstract classes and interfaces is that
an abstract class can contain both methods with zero
definition as well as methods with definition.But an
interface is one in which all the methods are with no
definition.

Is This Answer Correct ?    5 Yes 0 No

what is difference between abstraction and interface? ..

Answer / muthusenthil

Abstract class contains one or more unimplemented methods
left for future implementation by its derived class.it has
all property of class it cannot be instantiated.it provides
default behaviour.

Interface is mear specification nothing is implemented its
just a declaration.in java using interface we can model
multiple inheritance. it provides design flexibility.

Is This Answer Correct ?    1 Yes 0 No

what is difference between abstraction and interface? ..

Answer / munna

in abstraction we ca have abstract method and normal method
but in interface we must and should write only abstract methods

Is This Answer Correct ?    1 Yes 0 No

what is difference between abstraction and interface? ..

Answer / pushpendra mishra

Abstract is used in Frame work but Interface is used in specification

Is This Answer Correct ?    1 Yes 0 No

what is difference between abstraction and interface? ..

Answer / hitesh mandhyan

Abstraction is used in framework interface is used in
specification...

Is This Answer Correct ?    1 Yes 2 No

what is difference between abstraction and interface? ..

Answer / meena

abstraction is used in framework
interface is used in specification

Is This Answer Correct ?    1 Yes 2 No

what is difference between abstraction and interface? ..

Answer / ravikiran

abstraction is used in framework
interface is used in specification

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More Core Java Interview Questions

Describe how to implement singleton design pattern in struts.

0 Answers  


How do you write methodology?

0 Answers  


Say you want to store the information about a number of pets in an array. Typical information that you could store for each pet (where relevant) would be • Breed of animal • Animal's name • Its birth date • Its sex • Whether it has been sterilised or not • When it is due for its next inoculation • When it last had its wings clipped For each type of pet (eg. dog, cat or bird) you would typically define a class to hold the relevant data. Note: You do not need to implement these classes. Just answer the following questions. 3.1.1 What would be the advantage of creating a superclass (eg. Pet) and declaring an array of Pet objects over simply using an array of Objects, storing each of the instances of the different pet classes (eg. Dog, Cat or Bird) in it? 3.1.2 Would you define Pet as a class or as an interface? Why? (2) (2)

0 Answers  


What is the use of static import ?

4 Answers   Rolta,


What are non-access modifiers?

2 Answers   Cognizant,


Explain the role played by Java Virtual Machine in Java Programming?

1 Answers  


What does super keyword do?

0 Answers  


I want to re-reach and use an object once it has been garbage collected. How it's possible?

0 Answers  


byte a=5; byte b=5; byte c=a+b; System.out.println(c); whats the o/p?

7 Answers   NIIT, Wipro,


Tell some latest versions in JAVA related areas?

0 Answers  


How do you bind variables?

0 Answers  


What will happen if static modifier is removed from the signature of the main method?

0 Answers  


Categories