Which of the following declares an abstract method in an abstract Java class?
a. public abstract method();
b. public abstract void method();
c. public void abstract method();
d. public void method() {}
e. public abstract void method() {}
b. public abstract void method();
In A, the method has no return type. In C, void and abstract are in a wrong order. In D, the abstract keyword is missing. In E, the body {} should be removed. The correct answer is B.
Computer Science & Information Technology
You might also like to view...
The item marked ____ in the accompanying figure is the Playhead.
A. 1 B. 5 C. 7 D. 8
Computer Science & Information Technology
Which of the following is the most commonly used for describing the position of the background image with the background-position property?
A. pixel values B. percentages C. em values D. All of these are equally used.
Computer Science & Information Technology