Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interface vs Abstract class

 
jose chiramal
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to know when do we use Interface and when ABstract classes. I came across the following :

1.If you need to change your design make it an interface. Abstract classes provide default behavior. - what do these statements mean, what does behavior mean here?
 
Rob Spoor
Sheriff
Pie
Posts: 20665
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do a search. This question has been asked dozens of times before. We even have an FAQ entry for it: http://faq.javaranch.com/java/InterfaceVsAbstractClass
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In fact, *you* asked it. And what exactly are you asking? What do *you* think "default behavior" is--based on the results of when you asked this question here?
 
Jim Hoglund
Ranch Hand
Posts: 525
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What still bothers you about abstract classes and interfaces and their use?

Jim ... ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic