PRO192_-_SP_2024_-_Block_5_-_RE_1965.webp
T

PRO192_-_SP_2024_-_Block_5_-_RE_1965.webp

(Choose 1 answer)
You are writing a set of classes related to cooking and have created your own exception hierarchy derived from java.lang.Exception as follows:
Exception
+-- BadTasteException
+-- BitterException +-- SourException
BadTasteException is defined as an abstract class.
You have a method eatMe that may throw a BitterException or a SourException. Which of the following method declarations will be acceptable to the compiler?
A. public void eatMe(Ingredient list) throws BadTasteException
B. public void eatMe(Ingredient list) throws BitterException, SourException
C. public void eatMe(Ingredient list) may throw BadTasteException
D. public void eatMe(Ingredient list)

Thông tin

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

Image metadata

Filename
PRO192_-_SP_2024_-_Block_5_-_RE_1965.webp
File size
264.2 KB
Dimensions
1920px x 1012px

Share this media

Back
Bên trên Bottom