PRO192_-_SU_2023_-_Block_5_-_2_754.webp
Minh Đức1

PRO192_-_SU_2023_-_Block_5_-_2_754.webp

(Choose 1 answer)
Consider the following code:
1. Cat c
2. Washer w
3. Swamp Thing st
4
5. c = new Cat():
6. w = c:
7. st = (Swamp Thing) w,
Which of the following statements is true?
Where:
Mammal extends Animal
Cat. Swamp Thing extends Mammal
Cat implements Washer
Animal
Whasher w
Mammal
Cat (implementsWasher)
st
Dog
Raccoon (implementsWasher)
Swamp Thing
Back
Next
A. The code will compile but will throw an exception at line 7.
because the runtime class of w cannot be converted to type Swamp Thing.
W
Finish
El 32

Thông tin

Category
PRO192
Thêm bởi
Minh Đức1
Ngày thêm
Lượt xem
2,689
Lượt bình luận
18
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_SU_2023_-_Block_5_-_2_754.webp
File size
50.7 KB
Dimensions
1286px x 546px

Share this media

Back
Bên trên Bottom