SPIRO THE TECH GURU

Back

Return statement in finally block in java

By Admin on

  • Finally block will executes always excepts system.exit().
  • So if we are returning some value in finally means it will be returned always
  • Finally will executed so method always returns finally return value and no need of keeping return value at end of the method.
  • And in finally after return if we keep some statement those statement will be treated as dead code.
SPIRO Google Plus