This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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.
 
Don't get me started about those stupid light bulbs.
 
subject: Abstract classes