Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the purpose of the final in the try-catch-final

Answer Posted / guest

finally will execute after catch block if try throw
exception else it will execute after try.

ex:

class a
{
public static void main(String []asd)
{

try
{
throw new Exception();
}catch(Exception e)
{
System.out.println("catch");
}
finally{
System.out.println("finally");
}
}
}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of using bufferedinputstream and bufferedoutputstream classes?

1123


Is java developer a good career?

1085


Why main method is called first in java?

1058


What are parsing rules?

1046


What is the use of using enum to declare a constant?

1080


What is meant by structural programming?

1067


What is the basic concepts of OOPS?

1246


What is the generic function?

1041


What is a java lambda expression?

1101


What is the properties class?

1147


Can size_t be negative?

1247


Can you start a thread twice in Java?

1171


How many bytes is a string in java?

1040


Can we define private and protected modifiers for variables in interfaces?

1126


What is the main purpose of serialization in java?

1092