What does xmlvalidatingreader class do

by  |  28-May-2016 16:14

} public void sleep(int hours) { try { // 1000 milliseconds * 60 seconds * 60 minutes * hours Thread.sleep ( 1000 * 60 * 60 * hours); } catch (Interrupted Exception ie) { /* ignore */ } } public abstract void make Noise(); } Note that the abstract keyword is used to denote both an abstract method, and an abstract class.

Now, any animal that wants to be instantiated (like a dog or cow) must implement the make Noise method - otherwise it is impossible to create an instance of that class.

Some common operations are performed by all animals, but in a different way as well.

When an operation is performed in a different way, it is a good candidate for an abstract method (forcing subclasses to provide a custom implementation).

Let's look at a Dog and Cow subclass that extends the Animal class.

Community Discussion