What will happen if in a try block we throw an exception but in the finally block we return a int value ?

By | August 3, 2019

In this we post we will discuss about one of very important java interview question and question is that What will happen if in a try block we throw an exception but in the finally block we return a int value ?

Output of above program:
The return Value : 10

 

You may also like –

Java program to Remove Duplicate Elements From an Array
Find common elements between two Arrays
Find largest and smallest number in the given Array
Java Program to find duplicate elements in an Array
Count number of words in a string in java

Thanks for visiting blog. If you have any doubts or any suggestions to make please drop a comment.

Leave a Reply

Your email address will not be published. Required fields are marked *