Meaningless Drivel is fun!
The moose likes JSP and the fly likes abstract class and interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "abstract class and interface" Watch "abstract class and interface" New topic

abstract class and interface

parag chaudhari

Joined: Oct 10, 2002
Posts: 1
hi all,
can any tell me,
when to use abstract classs and interfaces.
Dilip kumar
Ranch Hand

Joined: Oct 16, 2000
Posts: 360
You would use an abstract class when you have common methods that any subclass needs to have.
You use interfaces when you do not want the class to do anything, but tell all other classes the methods that they must have in order to be instatiated.
I agree. Here's the link:
subject: abstract class and interface
It's not a secret anymore!