Q29.webp
ThanhTam81

Q29.webp

Kizspy | Question: 29
(Choose 1 answer)
Consider a superclass with a private method and a subclass that attempts to override it. What happens in
terms of method overriding and access control?
A. The subclass can successfully override the private method.
B. The private method cannot be overridden in the subclass.
C. The subclass can override the private method, but only if it is declared as "protected" in the superclass.
D. The subclass can override the private method, but only if it is declared as "public" in the superclass.
E. The subclass can override the private method, but only if it is declared as "static" in the superclass.
F. The access modifier of the superclass method has no impact on method overriding.

Thông tin

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

Share this media

Back
Bên trên Bottom