Differenze tra le versioni di "Programmazione:Java/Exception"

Da WikiSitech.
Vai alla navigazioneVai alla ricerca
 
Riga 1: Riga 1:
 +
[[Programmazione:Java|<< Back to Java]]
 +
 
{| cellspacing=2 width="100%"
 
{| cellspacing=2 width="100%"
 
=Exception=
 
=Exception=

Versione attuale delle 10:31, 14 apr 2008

<< Back to Java

Exception

Usare eccezioni checked per essere sicuro che qualcuno le intercetti

Bad Practice void function() {

  throw new RuntimeException("");

}

Best Practice void function() throws CheckedException{

  throw new CheckedException("");

}