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 |
Is the empty set a singleton?
Why java uses the concept of the string literal?
what is Inheritense
What does the ‘static’ keyword mean? Is it possible to override private or static method in java?
What is ascii format?
How do you compare two strings? any predefined method for this?
How does static modifier work?
How to display names of all components in a Container?
What is an anonymous class in java?
Explain wait(), notify() and notifyall() methods of object class ?
Why sleep()is in Thread and wait() in Object class? Why can't I have both in one class or vice versa?
How to declare unique ArrayList ?