agnes71 agnes71
  • 14-04-2019
  • Computers and Technology
contestada

a program to illustrate exceptional handling​

Respuesta :

tonb
tonb tonb
  • 14-04-2019

You surround your part of the program that can throw exceptions with a

try { ... } block and place a catch(...) { ... } directly below it.

You could put code in the try block that divides by zero to see an exception in action. Alternatively, you can throw one yourself using the throw keyword.

Answer Link

Otras preguntas

_________ ruled Afghanistan when the United States invaded that country in the wake of the 9-11 terrorist attacks by al-Qaeda. A. Saddam Hussein B. Osama bin
The cost of a movie ticket was increased by 15%. The old price was 8$.How much are they now
David is traveling to the United States for his next weightlifting competition. If he weighs 120.3 kilograms, how much does he weigh in pounds?
please help asap!!! Factor 5y + 5w. A) 5y(5 + w) B) (5y + 5)w C) y(5 + 5w) D) (y + w)5
solve for the linear system by using substitution x=6-4y 2x-3y=1
find the measure of the exterior angle shown (4x+8), (2x+3), and 51
a rectangle swimming pool is 4 ft deep. one side of the pool is 2.5 times longer than the other. the amount of water needed to fill the swimming pool is 1960 cu
Can someone please help me with this .
this is the first one
What act of cowardice does godrich perform? Why does the poet find this especially cowardly