49.5k views
3 votes
In Java an abstract class cannot be sub-classed

?? True

?? False

1 Answer

7 votes

Answer:

False

Step-by-step explanation:

An abstract class is a class declared abstract — it may or may not include abstract techniques. It is not possible to instantiate abstract classes, but they can be sub-classed.

Abstract method declaration

abstract void moveTo(double X, double Y);

Usually the subclass offers solutions for all of the abstract techniques in its parent class when an abstract class is sub-classed. If not, however, the subclass must be declared abstract as well.

Example

public abstract class GraphicObject {

// declaring fields

// declaring non-abstract methods

abstract void draw();

}

User Vinhent
by
7.4k points