Which two modifications should you make so that the code compiles successfully?

Given the code fragment: Which two modifications should you make so that the code
compiles successfully?

Given the code fragment: Which two modifications should you make so that the code
compiles successfully?

A.
Option B

B.
Option C

C.
Option D

D.
Option E

E.
Option A



Leave a Reply 11

Your email address will not be published. Required fields are marked *


Harsh Mishra

Harsh Mishra

A,B
and
B,C
both will work.

vepr85

vepr85

wrong!!!
A C

Narayana Gowda

Narayana Gowda

BE(Option A and Option C will make only compilation successful, during run time exception will raise)

Javier Miranda

Javier Miranda

A y B por la puta

bella

bella

I ran this code and the answers I got are A(Option B), and B(Option C). TestKing says the answer is only A(Option B), which is weird because the question asks “Which two…”.

Xsvier

Xsvier

OPtion A and Option C, note that Option B does not work cause Exception is a superclass of IOException and there is an unreachable code.

Tomas

Tomas

Answers: B (option C) and E (option A)
Tested

JoJo

JoJo

A(option B),B(option C)

Birendra

Birendra

Since the question is “Which two modifications should you make so that the code
compiles successfully?” and hence Option A and C will let the program be error free at compile time.

smh

smh

correct answer A and C,
B is unreachable.