This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interface

 
Matteo Giacometti
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the difference (with a simple example code, please) between Abstract Class and Interface?
Thanks
 
Peter Guillebaud
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm not too sure about this either but I think that the abstract class can include fully defined methods whereas an interface cannot. The interface just lists the method names and signatures that the subclasses must implement.
 
Johannes de Jong
tumbleweed
Bartender
Posts: 5089
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic