Visualizzazione dei risultati da 1 a 9 su 9

Visualizzazione discussione

  1. #3
    Utente di HTML.it L'avatar di neo999
    Registrato dal
    Dec 2010
    Messaggi
    30
    Quote Originariamente inviata da Alex'87 Visualizza il messaggio
    Cosa vuol dire? O_o

    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
    Ultima modifica di neo999; 20-02-2014 a 23:02

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.