Created
April 22, 2014 16:37
-
-
Save dodops/11185938 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TesteErro { | |
public static void main(String[] args){ | |
System.out.println("Inicio da main"); | |
medoto1(); | |
System.out.println("Fim da main"); | |
} | |
static void medoto1(){ | |
System.out.println("Inicio do método 1"); | |
metodo2(); | |
System.out.println("Fim do método 1"); | |
} | |
static void metodo2(){ | |
System.out.println("Inicio do método 2"); | |
int[] arr = new int[10]; | |
try{ | |
for( int i = 0; i <= 15; i++){ | |
arr[i] = i; | |
System.out.println(i); | |
} | |
} catch (ArrayIndexOutOfBoundsException e){ | |
System.out.println(e); | |
} | |
System.out.println("fim do método 2"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment