1. 학습
  2. /
  3. 강의
  4. /
  5. Data Types and Exceptions in Java

Connected

연습 문제

Try-catch

Catch a possible arithmetic exception - division by zero - and handle it by displaying a message. You will also get a chance to see more use of the BigDecimal package that has been preloaded for you.

지침

100 XP
  • Add a try and the start of the try code block.
  • Catch the ArithmeticException with (ArithmeticException e) and start a catch code block.
  • Finish the catch code block.