ad esempio questo codice netbeans restituisce output vuoto (stampa vuoto). perchè? qual'è la spiegazione?
codice:package c1; class MyExc1 extends Exception {} class MyExc2 extends MyExc1 {} class MyExc3 extends Exception {} public class C1 { public static void main(String[] args) throws Exception{ try{ q(); System.out.print(1); } catch (MyExc1 k){ } catch (MyExc3 x){ System.out.print(2); } } static void q() throws Exception{ try{ throw (new MyExc3()); } catch (MyExc3 j){ throw (new MyExc1()); } catch (Exception w){ System.out.print(3); } finally { throw (new MyExc2()); } } }
Per le altre domane qualcuno sa qualcosa? grazie


Rispondi quotando