davegimo

trycatch_test

Jun 4th, 2019
244
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class test {
  2.  
  3.     public static void senza() {
  4.         int a = 1/0;
  5.         }
  6.  
  7.  
  8.     public static void con() {
  9.  
  10.         try {
  11.             int a = 1/0;
  12.             }
  13.  
  14.         catch (Exception e) {
  15.             System.out.println("eccezione!!!");
  16.             }
  17.         }
  18.  
  19.  
  20.     public static void main(String[] args) {
  21.         System.out.println("INIZIO TEST\n \n");
  22.  
  23.         senza();
  24.  
  25.  
  26.         System.out.println("\n \nFINE TEST");
  27.  
  28.         }
  29.  
  30.     }
RAW Paste Data