Javatpoint Logo

abstract class

By: tufecu*** On: Sun May 13 22:13:47 IST 2018     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
what is the difference between abstract class and interfaceUp0Down

 
Well, the class is set of variables and method implementations.
And interface is set of Abstract methods.

...Hope it answer your question...
Image Created0Down

By: [email protected] On: Sat May 26 12:58:59 IST 2018 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No
 
All methods declared in interfaces are abstract by default whereas in abstract class it may be instance method as well as abstract. Variables defined in the interface are final always but in case of abstract class, they are non-final. So there is more restriction on method and variables defined in an interface instead of abstract class.Image Created0Down

By: [email protected] On: Fri Jun 15 14:18:56 IST 2018 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No
 
abstract class also contain non abstract method but interface always contains all abstract method by default if programmer not define them as default.Image Created0Down

By: [email protected] On: Sat Jun 16 13:01:18 IST 2018 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No