Computer Science, asked by bhumikaacharya07, 6 months ago

try {
int c = 1/0;
} catch (Exception e) {
System.out.println("E");
} finally
System.out.println("F");
}
What happens when this code is compiled and executed?
Pick the closest option
O The code gives a compile time error
O The code throws an exception at runtime
O The code compiles, runs, and prints EF
O The code compiles, runs, and prints E
O The code compiles, runs, and prints F
Submit​

Answers

Answered by pawarvaishali9999
2

Answer:

The code compiles,run,and prints EF

Explanation:

Answered by ankhidassarma9
0

Answer:

The code gives a compile time error.

Explanation:

  • after the keyword finally, a '{' is expected.
  • If we add '{' after finally, The code will compile, runs, and prints EF.

Similar questions