What is “try and catch” in java
Answers were Sorted based on User's Feedback
Answer / guest
WHILE DEVELOPING THE PROJECTS ,EXCEPTIONS ARE RAISED.THE
EXCEPTIONS ARE CALLED THE RUN TIME ERRORS.THE EXCEPTIONS ARE
VERY USEFUL WHILE DEVELOPING THE PROJECTS BECAUSE THE
"ROBUST" FEATURE IS COMES FROM THIS EXCEPTION CNCPT.WHILE
DEVELOPING THE PROJECTS, TRY BLOCK IS USEFUL TO THE
EXCEPTION IS LIKELY OCCURED IN THAT BLOCK THT BLOCK IS
PLACED INSIDE THE TRY BLOCK.THAT RAISED EXCEPTIONS ARE CATCH
AT THE CATCH BLOCK.TR7Y BLOCK IS CALLED THE EXCEPTION RAISER
ALSO AND THE CATCH BLOCK IS CALLED THE EXCEPTION HANDL;ER BLOCK
| Is This Answer Correct ? | 16 Yes | 0 No |
Answer / reshma
TRY AND CATCH BLOCKS ARE USED FOR EXCEPTION HANDLING SOMETIMES PROGRAMMER GIVE WRONG INPUT THEN EXCEPTION OCCCUR,IN TRY BLOCK WE LOGIC OF PROGRAM IS WRITTEN WHERE EXCEPTION OCCURED THAT EXCEPTOINS ARE THROWN TO CATCH BLOCK.CATCH BLOCK CATCHES THE EXCEPTION THROWN BY TRY BLOCK.
| Is This Answer Correct ? | 7 Yes | 1 No |
I dont want to use serialzable in java is there any another concept so plz tell me
What is type inference in java8?
What checkbox method allows you to tell if a checkbox is checked?
How are variables stored in memory?
What is string literal in java?
where exactly collections are usefull in realtime
what are the diffrences between interface and abstract class?
What is the best definition for data?
Differentiate storage classes on the basis of their scope?
Can a class extend 2 classes in java?
Difference between hashCode() & equals()?
What is the difference between throw and throws in java?