permaculture playing cards*
The moose likes Beginning Java and the fly likes Abstract classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Abstract classes" Watch "Abstract classes" New topic
Author

Abstract classes

Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Is it fair to say that an abstract class should only blueprint the methods that will be public in the classes which inherit from it ?
James Gray
Ranch Hand

Joined: Sep 10, 2001
Posts: 30
I would say yes, mostly. If all you want to do is "blueprint" though, that's more aptly done with an Interface. Abstract classes should be used when you want to provide partial implementation and/or support to those future methods.
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
The reason for blueprinting with an abstract class. Is that I can use the same class regardless of the networking method I chose.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Abstract classes