{myadvertisements[zone_1]}
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What are the different ways to handle exceptions?
#1
The two methods to handle exception are as follows:-

Wrapping the desired code in the try block that is followed by catch block
List out the desired exception in throw and the caller of the method handle the exception
Reply
{myadvertisements[zone_3]}
#2
There are two ways to handle exceptions,
1. By wrapping the desired code in a try block followed by a catch block to catch the exceptions. and
2. List the desired exceptions in the throws clause of the method and let the caller of the method hadle those exceptions.


Best Teeth Whitening in Delhi | Cosmetic Dental Treatment in Delhi
Reply
{myadvertisements[zone_3]}
#3
There are three ways to handle exception.
1. Try catch block
2. Throws clause, that you define with method name
3. Throw clause that is thrown from the program to, raise an error condition in program.
Reply
{myadvertisements[zone_3]}
#4
We can provide multiple exceptions in the throws clause and it can be used with main() method also. try-catch – We use try-catch block for exception handling in our code. try is the start of the block and catch is at the end of try block to handle the exceptions.
Reply
{myadvertisements[zone_3]}


Possibly Related Threads...
Thread Author Replies Views Last Post
  New ways to rank website in 2017 by designing user friendly websites..? Amit Chauhan 0 14 08-01-2017, 06:12 PM
Last Post: Amit Chauhan

Forum Jump:


Users browsing this thread: 1 Guest(s)
{myadvertisements[zone_2]}