PRO192_-_FA_2023_-_RE_1159.webp
Hoàng Nam

PRO192_-_FA_2023_-_RE_1159.webp

(Choose 1 answer)
Exception
You are writing a set of classes related to cooking and have created your own exception hierarchy derived from java.lang.Exception as follows:
+-- 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)

Exit 34
  • Like
Reactions: bách

Thông tin

Category
PRO192
Thêm bởi
Hoàng Nam
Ngày thêm
Lượt xem
3,608
Lượt bình luận
16
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_FA_2023_-_RE_1159.webp
File size
64.4 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom