Exception JAVA


SUBMITTED BY: animehq

DATE: Sept. 4, 2016, 4:06 p.m.

FORMAT: Text only

SIZE: 251 Bytes

HITS: 87684

  1. public static void main(String[] args) {
  2. int j = 20, i = 0;
  3. try {
  4. System.out.println(j/i);
  5. } catch (ArithmeticException e) {
  6. System.out.println("Division par zéro !");
  7. }
  8. System.out.println("coucou toi !");
  9. }

comments powered by Disqus