Guess I :- Which exception is thrown to the outer world? Exception of try block or exception of Finally block?
- Exception is thrown inside
tryblock (highlighted in red).
Finallyblock will always execute and exception is also thrown inside finally block.
- The exception thrown from the
finallyblock would be propagated up the call stack, even if the exception thrown from the
tryblock would probably be more relevant to propagate.
Guess 2 : Which exception is thrown now? Exception of try block or exception of Finally block?
Try with resourcesis implemented
FileInputStreamvariable is declared inside the parentheses after the
- An Exception is thrown inside the
- Exception is also thrown inside
- The exception thrown inside the
tryblock is thrown to the outside world instead of exception thrown inside
Read More :- Difference in interface of JAVA7, JAVA8 and JAVA9?
Why they call it java and why java is represented by coffee beans or cup of coffee?
How to generate code coverage report in java? Jacoco | Graphical Report
what is the difference in Interface of Java7, Java8 and Java9?
How to configure Eclipse IDE for Scala?
What are the different Eclipse Versions | Comparison
Why do abstract classes in Java have constructors?
Is Java Pure Object Oriented Programming Language?
List in Collections of Java
Error Codes in programming language - 404 200 500