ContactUs :

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

Difference between abstract class & interface?

Abstract class

abs class contains atleast one abs method

abs class also contains concrete methods

by default all vars are instance vars

we cannot create an obj for an abs class

abs contains the constructor

abs class comes under the class hirarchy

 

Interface

interface contains all abs methods

no concrete methods

all vars are public static and final

we can create a reference var

interface  doesnt contains a constructor

comes under interface hirarchy

 

Related Posts Plugin for WordPress, Blogger...
Flag Counter