What advantages does object-oriented exception handling provide?

What will be an ideal response?

Besides clarity, an advantage to object-oriented exception handling is the flexibility it allows in the handling of error situations. When a method you write throws an exception, the same method can catch the exception, although it is not required to do so, and in most object-oriented programs it does not. Often, you don't want a method to handle its own exception. In many cases, you want the method to check for errors, but you do not want to require a method to handle an error if it finds one.

Computer Science & Information Technology

You might also like to view...

Which of the following is NOT part of the Accounting Number Format?

A) Small amount of space at the right edge of the cell B) Three decimal places C) A fixed dollar sign aligned at the left edge of the cell D) A thousand comma separator

Computer Science & Information Technology

char[][] table = new char[10][5];How many dimensions are in the array seen in the accompanying figure?

A. 1 B. 2 C. 5 D. 10

Computer Science & Information Technology