+ 1

why we use exception??

28th Jul 2016, 3:07 PM
Yajiv
Yajiv - avatar
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
28th Jul 2016, 3:59 PM
WPimpong
WPimpong - avatar
+ 1
thanks to all
28th Jul 2016, 4:36 PM
Yajiv
Yajiv - avatar
- 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.
28th Jul 2016, 3:43 PM
Manikanth Vanka
Manikanth Vanka - avatar
- 1
exception is raised to user convince in the program
30th Jul 2016, 1:48 AM
Ravi Teja
Ravi Teja - avatar