CONTROL DE ERRORES
EJERCICIO "8"
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package clase;
/**
*
* @author GATO
*/
public class Clase {
static void unMetodo() {
try {
throw new NullPointerException(" DON GATO CON VOTAS");
} catch(NullPointerException e){
System.out.println("Capturada la excepcion en unMetodo");
throw e;
}
}
public static void main(String[] args) {
// TODO code application logic here
try {
unMetodo();
}catch(NullPointerException e){
System.out.println("Capturada la excepcion en unMetodo" + e);
}
}
}
No hay comentarios:
Publicar un comentario