Given the code fragment:
Which two modifications should you make so that the code compiles successfully?
A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
Given the code fragment:
Which two modifications should you make so that the code compiles successfully?
A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
A and C
The correct answers are A and C.
Answer B is incorrect because the order of exceptions should be listed from specific to general:
try{ xobj.printFileContent(); }
catch(IOException e){}
catch(Exception e){}