PRO192_-_SU_2024_-_FE2_2332.webp
Nanami871

PRO192_-_SU_2024_-_FE2_2332.webp

Kizspy | Question: 30 (Choose 1 answer)
Consider an abstract class "Shape" with an abstract method "calculateArea()." If a concrete subclass "Circle"extends "Shape" and provides an implementation for "calculateArea()," what happens when an object of the "Circle" class is created and the "calculateArea()"
A. The abstract method in the superclass is executed.
B. The concrete method in the subclass is executed.
C. The program will not compile.
D. An exception is thrown at runtime.
E. Both the abstract method in the superclass and the concrete method in the subclass are executed.
F. The result depends on whether the "calculateArea()" method is declared as static.

Thông tin

Category
PRO192
Thêm bởi
Nanami871
Ngày thêm
Lượt xem
4,711
Lượt bình luận
13
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom