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

Computer Science & Information Technology

You might also like to view...

If you send a resume to a company, it is good practice to include a cover letter

Indicate whether the statement is true or false

Computer Science & Information Technology

Which of the following is a form of input validation that looks for allowable characters or patterns and only allows those?

A. blacklisting B clipping levels C. whitelisting D. traffic policing

Computer Science & Information Technology

The PROTECT Act retained the statutes of limitations for child abduction or child abuse

Indicate whether the statement is true or false.

Computer Science & Information Technology

In a table or file, each column represents a record and each row represents a field.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology