Sign in to follow this  
Followers 0
srinivasanit

diff bw abstract and interface


hi friends.i saw a java question in an interview questons collection.that is what s the difference between abstract class and an interface in java.I am a beginer.so i dono the answer if any one knows plz explain.

Share this post


Link to post
Share on other sites

hi friends.i saw a java question in an interview questons collection.that is what s the difference between abstract class and an interface in java.I am a beginer.so i dono the answer if any one knows plz explain.

Abstract class can have abstract methods as well as concrete methods. Interface must only have abstract methods

Share this post


Link to post
Share on other sites
interface:-
an Interface is a pure abstract class, the methods in an interface are by default abstract,and the variable are final variable i.e constants,we can implement any no of interface

abstract class :
abstract class can have abstract methods as well as non abstract methods

Share this post


Link to post
Share on other sites

hi friends.i saw a java question in an interview questons collection.that is what s the difference between abstract class and an interface in java.I am a beginer.so i dono the answer if any one knows plz explain.

I just came across this link in Google. Hope it might help you in this regard.

Share this post


Link to post
Share on other sites
The basic difference between java abstract class and interface is that the methods of java interface are utterly abstract which don’t have implementations. Java abstract contains the instance methods which implements a default behavior. ____________ Asset Finance

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0