Esempio

public static void main( String[] args) {
int value = 0;
try {
value = Integer.parseInt( args[ 0 ] );
} catch ( NumberFormatException e0 ) {
try {
value = Integer.parseInt( args[ 1 ] );
} catch ( NumberFormatException e1 ) {
try {
value = Integer.parseInt( args[ 2 ] );
} catch ( NumberFormatException e2 ) {

}
}
}
}

Soluzione
Usare lo Strategy Design Pattern.
  1. Creare un'interfaccia per eseguire l'attività.
  2. Far lanciare un'eccezione al metodo che esegue l'attività.
  3. Rendere la classe con il blocco nidificato try/catch un contenitore di strategie.
  4. Modificare il blocco nidificatotry/catch in loop for
  5. Finché è presente un eccezione nel loop, applicare le strategie.

public static void main( String[] args) {
int value = 0;
for ( int i = 0; i < args.length; i++ ) {
try {
value = Integer.parseInt( args[ i ] );
break ;
} catch ( NumberFormatException e ) {
// Ignore exception
}
}

}