fork(2) download
  1. class Teste30 {
  2. public static void main(String[] args) {
  3. String teste = "Isso funciona mesmo, ok?";
  4. String [] vetor = teste.split(" ");
  5. String aqui = vetor[0];
  6. String ali = vetor[1];
  7. String acola = vetor[3];
  8. String there = vetor[4];
  9. for (String nome : vetor) {
  10. System.out.println(nome);
  11. }
  12. }
  13. }
Runtime error #stdin #stdout #stderr 0.05s 711168KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
	at Teste30.main(Main.java:8)