• Post Reply Bookmark Topic Watch Topic
  • New Topic

Abstract class and Interface  RSS feed

 
Yeshwantrao Patil
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear frendz

As I know many differences between abstarct class and interfaces..but still I am not clear in which situations more advantageous one over the other?


Thanx in advance
yeshwant
 
Himanshu Bisht
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
well though basic working is the same but there are many difference.Major one being-

1-Abstract classes are extended and interfaces are implemented.That means you can extend only one abstract class at a time but you can implement any number of interfaces.

2-Abstract class have both abstract and normal methods where as interfaces have all their methods abstract.

There are numerous other differences.Search google and you can find more.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See http://faq.javaranch.com/view?InterfaceVsAbstractClass
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!