This isn't quite true. An abstract class does not have to have any abstract methods.Originally posted by Scott Appleton:
An abstract class can declare variables, too. It can also provide implementations of some methods; it is abstract only because at least one method is declared but not implemented.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
green horn
There is another reason. It may be that each method has a default implementation but that no class that extends the abstract class would leave all the methods as their default. A class like MouseAdapter could have been made abstract because no one would ever instantiate a MouseAdapter because it doesn't do anything (all the methods are empty). In fact, it is abstract although it has no abstract methods!!!A class type should be declared abstract only if the intent is that subclasses can be created to complete the implementation. If the intent is simply to prevent instantiation of a class, the proper way to express this is to declare a constructor (�8.8.8) of no arguments, make it private, never invoke it, and declare no other constructors.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
please use the [code][/code] tags when showing code. visit <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=ubb_code_page" target="_blank">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=ubb_code_page</a> ,for more details