When try and catch block is used ?

Answer Posted / ravikiran

try is used to enclose the code which is supposed to throw
an exception
catch is used to catch the exception which is raised with
in the try block

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where we write javascript code in html page?

842


What is final method?

846


does java support pointers?

788


Why you should not use singleton?

777


How do you create a method in java?

774


What is the biggest integer?

840


Why does java not support pointers?

799


What are the 7 types of characters?

872


Can we declare register variable as global?

766


What is memory leak and how does java handle it?

793


What is a methodologist?

804


Explain the difference between throw and throws in java?

797


What is a priority queue java?

760


How to set the permissions to a file in java?

785


What are the different ways of implementing thread? Which one is more advantageous?

789