Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. class ExceptionHandling3 {
  2. public static void main(String[] args) {
  3. Scanner input = new Scanner(System.in);
  4. int num = input.nextInt();
  5. try {
  6. System.out.println("num : " + num);
  7. int result = 64 / num;
  8. int c[] = new int[5];
  9. c[6] = 1;
  10. } catch (ArithmeticException e) {
  11. System.out.println(e);
  12. } catch (ArrayIndexOutOfBoundsException e) {
  13. System.out.println(e);
  14. }
  15. System.out.println("try-catch sonrası kodlar");
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement