What is displayed on the console when running the following program?

```
public class Test {
public static void main(String[] args) {
try {
System.out.println("Welcome to Java");
int i = 0;
int y = 2/i;
System.out.println("Welcome to Java");
}
finally {
System.out.println("End of the block");
}

System.out.println("End of the block");
}
}
```
a. The program displays Welcome to Java three times followed by End of the block.
b. The program displays Welcome to Java two times followed by End of the block.
c. The program displays Welcome to Java two times followed by End of the block two times.
d. The program displays Welcome to Java and End of the block, and then terminates because of an unhandled exception.

d. The program displays Welcome to Java and End of the block, and then terminates because of an unhandled exception.

Computer Science & Information Technology

You might also like to view...

Tim needs the background of a text box to be green. He should do which of the following?

A. Change the shape effects. B. Change the shape outline. C. Change the shape fill. D. Change the shape position.

Computer Science & Information Technology

All of the following are valid elements for creating row groups EXCEPT:

A) B) C) D)

Computer Science & Information Technology