File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Interface vs Abstract class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Interface vs Abstract class" Watch "Interface vs Abstract class" New topic
Author

Interface vs Abstract class

jose chiramal
Ranch Hand

Joined: Feb 12, 2010
Posts: 266
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

Joined: Oct 27, 2005
Posts: 19232

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


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Jan 09, 2008
Posts: 525
What still bothers you about abstract classes and interfaces and their use?

Jim ... ...


BEE MBA PMP SCJP-6
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Interface vs Abstract class
 
Similar Threads
use of abstact class and interface
When to use an interface VS when to use abstract class
Abstract classes instead of Interfaces
Difference between interfaces and abstract classes
Interface OR Abstract Class