Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>
Anthony Villanueva
Ranch Hand
Joined: Mar 22, 2002
Posts: 1055
posted
0
Basically, an abstract class is a class that cannot be instantiated. If you like, you can treat it as an interface. An abstract class is normally expected to be subclassed and its methods overriden/implemented by this subclass. It doesn't matter if the abstract class has abstract methods or not. You can have an abstract with all of its methods implemented. However, a class that implements an interface or extends an abstract class, and does not implement all of superclass's methods, must be declared as an abstract class.
Snigdha Solanki
Ranch Hand
Joined: Sep 07, 2000
Posts: 128
posted
0
From the Java API, jav.io.InputStream is an abstract class.It is the superclass of all classes representing an input stream of bytes. InputStream has the following abstract method: public abstract int read(); which a subclass must provide an implementation for.Some of the subclasses of InputStream are FileInputStream,ByteArrayInputStream and FilterInputStream.
Snigdha<br />Sun Certified Programmer for the Java™ 2 Platform