Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Difference between abstract class and Interfaces?

Answers were Sorted based on User's Feedback



Difference between abstract class and Interfaces?..

Answer / nanthinikrishnan

An abstract class can have concrete method, which is not
allowed in an interface. Abstract class can have private or
protected methods and variables and only public methods and
variables are allowed in interface. We can implement more
than one interface , but we can extend only one abstract
class. Interfaces provides loose coupling where as abstract
class provides tight coupling.

Is This Answer Correct ?    7 Yes 0 No

Difference between abstract class and Interfaces?..

Answer / ranganathkini

An Interfaces defines a public contract of methods for the
classes that implement it. An implementing class must
implement all the method defined by the interface.

An abstract class on the other hand not only defines a
public contract of methods but may also provide partial
implementation of some or all of the class methods. A
subclass of an abstract class inherits the partial
implementation (if any) or must provide a concrete
implementation of the abstract methods.

Is This Answer Correct ?    4 Yes 0 No

Difference between abstract class and Interfaces?..

Answer / taresh nama

• Interfaces provide a form of multiple inheritances.
A class can extend only one other class.
• Interfaces are limited to public methods and
constants with no implementation. Abstract classes can have
a partial implementation, protected parts, static methods,
etc.
• A Class may implement several interfaces. But in
case of abstract class, a class may extend only one
abstract class.
• Interfaces are slow as it requires extra
indirection to to find corresponding method in in the
actual class. Abstract classes are fast.

Is This Answer Correct ?    2 Yes 0 No

Difference between abstract class and Interfaces?..

Answer / loganathan s

abstract is a class and its fulfilling while the subclass
is extends the abstract class methods.
where as interface also a class it declare a methods.we
must override all the methods at implements the interface.

Is This Answer Correct ?    1 Yes 0 No

Difference between abstract class and Interfaces?..

Answer / ravikiran

abstract class is the one which canhave both abstract as
well as non abstract methods
Interface is the one which has all the methods are abstract

Is This Answer Correct ?    2 Yes 1 No

Difference between abstract class and Interfaces?..

Answer / mari

multiple inheritence is applicable for interfaces but at
abstract class can't support multiple inheritence it can
have only multilevel inheritence

Is This Answer Correct ?    0 Yes 0 No

Difference between abstract class and Interfaces?..

Answer / hema

Abstract Class is the Class where it can have Methods with
both Definition and Declaration.

Method Declaration: public void Display();
Method Definition: public void Add(){ ..code goes on here...}

When all the methods in a class are only Declared then it is
Interface.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

When is the finalize() called? What is the purpose of finalization?

0 Answers  


Which class cannot be a subclass in java?

0 Answers  


explain copyonwritearraylist and when do we use copyonwritearraylist?

0 Answers  


Can java program run without jre?

0 Answers  


what is filters and its use?

2 Answers   Virtusa,


What is the protocol is used in type4 driver?

4 Answers   CMC,


Is object a data type in java?

0 Answers  


Explain java code for recursive solution's base case?

0 Answers  


what is difference between global methods and local methods?

1 Answers  


List methods available in Java Queue interface

1 Answers  


What is fail fast in java?

0 Answers  


What is the differences between heap and stack memory in java? Explain

0 Answers  


Categories