+ 1
why we use exception??
4 Answers
+ 1
Exception is used to handle errors and other exceptional events.
Advantages of using exception over traditional error-management techniques. See
https://docs.oracle.com/javase/tutorial/essential/exceptions/advantages.html
+ 1
thanks to all
- 1
Assume you are designing a bank application which is a desktop one..you built it and handed over.While using the application for suppose they got a error which is considered as runtime.So transactions will stopped.user doesn't know what the error is ?it might show bunch of error lines.Though errors caused due to user mis attempts,unknown access whatever it might be.so to handle those exceptions are used.. instead of showing the total errors..thry throw a message like consult admin or whatever.
- 1
exception is raised to user convince in the program