If the statements after the catch block is going to be executed anyway what is the real use of finally block in java? Example
try {
//Code
}
catch (Exception e)
{
//Code
}
finally {
System.out.println("anyway it will be executed");
}
System.out.println("anyway it will be executed");