Java OCA OCP Practice Question 627

Question

Fill in the blanks:

A try statement has ___ finally block(s) and ___ catch blocks.

  • A. zero or one, zero or more
  • B. one, one or more
  • C. zero or one, zero or one
  • D. one or more, zero or one


A.

Note

A try statement is not required to have a finally block, but if it does, there can be at most one.

A try statement can have any number of catch blocks or none at all.

Option A is the correct answer.




PreviousNext

Related