This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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)