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");
}
catch (RuntimeException ex) {
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. You cannot catch RuntimeException errors.

c

Computer Science & Information Technology

You might also like to view...

Which of the following refers to the amount of horizontal space between characters?

A) Character spacing B) Scaling C) Kerning D) Position

Computer Science & Information Technology

An IP address consists of a 32-bit binary number. When written like this: 192.168.1.1, it is known as ________ notation

A) Decimal B) Base 10 C) Octet D) Dotted-decimal

Computer Science & Information Technology