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 HTML");
}
finally {
System.out.println("The finally clause is executed");
}
}
}```
a. Welcome to Java, then an error message.
b. Welcome to Java followed by The finally clause is executed in the next line, then an error message.
c. The program displays three lines: Welcome to Java, Welcome to HTML, The finally clause is executed, then an error message.
d. None of the above.
b
You might also like to view...
A field labeled PHONE that accepts data such as (610) 555-1212 would use the Number data type
Indicate whether the statement is true or false
Like Alice, Java provides two types of loop statements.
Answer the following statement true (T) or false (F)