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...

Yellow has the triplet ____.

A. (0, 0, 0) B. (255, 255, 0) C. (0, 255, 255) D. (255, 0, 255)

Computer Science & Information Technology

JavaScript programs run from inside a Web document.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Access based enumeration limits the shares a user can see to only the shares the user has a minimum of read permissions for.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

You can resize an image using the Image Size command on the Tools menu.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology