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
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
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
The PROTECT Act retained the statutes of limitations for child abduction or child abuse
Indicate whether the statement is true or false.
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)