This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I know that if you have an abstract method, you need to declare the class as abstract as well. My question is that can a class be declared abstract without having any abstract methods in it. Regards Emad
If you don't want a class to be instantiated then there are two options: 1) if you want the class to be used as a parent in an inheritance hierarchy then make the class abstract (java.awt.event.FocusAdapter) 2) if you do not want the class to be used as a parent in an inheritance hierarchy then make the class final and give it a private constructor (java.lang.Math)