Which three are bad practices?
A.
Checking for an IOException and ensuring that the program can recover if one occurs
B.
Checking for ArrayIndexoutofBoundsException when iterating through an array to
determine when all elements have been visited
C.
Checking for Error and. If necessary, restarting the program to ensure that users are
unaware problems
D.
Checking for FileNotFoundException to inform a user that a filename entered is not valid
E.
Checking for ArrayIndexoutofBoundsException and ensuring that the program can
recover if one occur
B,C
B,C,E
Answers: B, C, E
Explanation:
B – Better to check if the index is within bounds.
C – restarting is a last possibility that should be done.
E – Better to check if the index is within bounds.