Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

abtract class and interface

 
Eshwin Sukhdeve
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
suppose I have one abstract class.it contains all methods as abstract.and I have one interface..by defualt interface having all
methods abstract.in this case both having same behaviour.then why we chosse either interface or abstract class.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64692
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please SearchFirst. This exact question has been posed many times.
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And we even have a FAQ for it http://www.coderanch.com/how-to/java/InterfaceVsAbstractClass
This would be more suitable on the beginners forum. Moving
 
Eshwin Sukhdeve
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic