Multiple Choice
Which of the following statements about exception handling is correct?
A) Statements that may cause an exception should be placed within a catch block.
B) The main method of a Java program will handle any error encountered in the program.
C) Statements that may cause an exception should be placed within a throws block.
D) Statements that may cause an exception should be placed within a try block.
Correct Answer:

Verified
Correct Answer:
Verified
Q27: Consider the following code snippet: System.out.printf("%-12s%8.2f",description,totalPrice);<br>Which of
Q28: Insert the missing code in the following
Q29: Which of the following statements about using
Q30: Consider the following code snippet. Scanner inputFile
Q32: Insert the missing code in the following
Q33: Consider the following code snippet: throw IllegalStateException("This
Q34: Which String class method will remove spaces
Q35: Insert the missing code in the following
Q36: Your program must read in an existing
Q101: The _ method of the Character class