jump to navigation

Difference between Abstract and Interface June 23, 2005

Posted by javafoo in java interview, javanotes, OOAD.
  • Interface only provides the contract, does not add default behaviour, whereas abstract classes provide default behaviour (not necessarily, only if you want to, but that is the point)
  • You can implement as many interfaces as you may want, but only extend from one abstract class
  • You cannot have private, protected variables in an Interface.


1. Ani - April 21, 2008

Nice thats i want to know….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: