• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question related to abstract class and Interface  RSS feed

 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi every body I have one query :
At what situation should I use abstract class and when should I go for Interface ?
Please give some example .

Thanks and regards,
S
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search the forums.
This question comes up quite a few times.
 
Rob Spoor
Sheriff
Posts: 21133
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://faq.javaranch.com/java/InterfaceVsAbstractClass
 
Embla Tingeling
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
s begri wrote:At what situation should I use abstract class and when should I go for Interface ?


I think I go directly for the rule of thumb this time.

As a rule of thumb use an interface. It will give your design the most flexibility.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!