This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Difference Between Abstract and Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Difference Between Abstract and Interface" Watch "Difference Between Abstract and Interface" New topic
Author

Difference Between Abstract and Interface

Maheswaran Devaraj
Ranch Hand

Joined: Sep 14, 2007
Posts: 47
Hi All,

I want to know where we have to use abstract class and where we have to use the Interface.

Regards,
Maheswaran
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3816

If you want to provide some/common implementations for certain behaviors you may use abstract classes whereas interfaces (being 100% abstract) you force the implemented class to implement the behavior. You may find lots of information by searching through the forums (java) here. And find this Sun tutorial which would be helpful.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37900
    
  22
"Maheswaran" please read the important administrative private message I just sent you.
 
wood burning stoves
 
subject: Difference Between Abstract and Interface
 
Similar Threads
Where to use abstract class and Interface?
difference between interface and abstract
abstract and Interface
Abstract and Interface
Interface and abstract class