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");
}
}
}
```
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 three times.
d. The program displays Welcome to Java two times.
b. The program displays Welcome to Java two times followed by End of the block.
You might also like to view...
The plot in Figure 2.1 shows that Internet growth did not start until after 1995. Why is the figure misleading?
What will be an ideal response?
Because the data members of an object of type pair are private, each object of type pair can directly access these data members in a program.
Answer the following statement true (T) or false (F)