PRO192_-_SP_2023_-_BL5_-_FE_118.webp
hoangduc2001

PRO192_-_SP_2023_-_BL5_-_FE_118.webp

Multiple Choices
Answer (Choose 1 answer)
Which of the following is the most appropriate way to handle invalid arguments in a public method?
A. Throw java.lang.InvalidArgumentException.
B. Throw java.lang.IllegalArgumentException.
C. Check for argument validity in an assert statement, which throws AssertionError when the arguments are invalid.
D. Use non-assert code to check for argument validity. If invalid arguments are detected, explicitly throw AssertionError.

Thông tin

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

Share this media

Back
Bên trên Bottom