Multiple choice technology web technology

Find out the compile time/run time exception/s with below snippet Ans: c try { ------ ------- ------ } finally { ----- ----- }

  1. a. It misses catch block and gives compile time error

  2. b. It misses catch block and give run time excpetion

  3. c. Code above compiles successfully

  4. d. Placement of finally block is not proper

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Java allows try-finally blocks without a catch clause - this is valid syntax. The finally block executes regardless of whether an exception occurs, making it useful for resource cleanup. A catch block is only required if you want to handle specific exceptions.