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

What is the benefit of lambda expressions?

484


Does A Class Inherit The Constructors Of Its Superclass?

528


What is off heap memory?

540


How objects are stored in java?

538


What is proper subset?

528






What is lossy conversion in java?

550


What is purpose of find feature?

601


How do you create a first line indent?

497


Why set is used in java?

560


What is the meaning of 3 dots in java?

675


What do you mean by garbage collection used in java?

565


What steps are taken when the OS shifts from one-thread execution to another?

891


What is JFC?

699


What are the different data types in java?

524


Which number is denoted by leading zero in java?

793