News:

MyKidsDiary.in :: Capture your kids magical moment and create your Online Private Diary for your kids

Main Menu

Difference between Interface and Abstract

Started by thiruvasagamani, Jul 10, 2008, 06:40 PM

Previous topic - Next topic

thiruvasagamani

Abstract Class:

It contains both abstract methods and non abstract methods

Object can't be created just through reference we are calling all the methods

It is implemented by subclass , i.e which class is extended from this,
abstract class contains only nonabstract, this situation also code will compile fine, but problem at runtime
abstract can't be declared with  Final, Synchronized, Native, just your requirements you implement some methods in the abstract class
this class also contain Constructor

Interface

Interface contains all abstract methods,
all methods compulsory implemented by particular class
interface does not contain Constructor,
Thiruvasakamani Karnan