G
Guest
Gast
hi, warum bekomm ich hier folgenden Fehler beim ausführen?
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:
Code:
public class Test
public static void main(String args[]){
int a=Integer.parseInt(args[0]);
int b=Integer.parseInt(args[1]);
int c=Integer.parseInt(args[2]);
int d=Integer.parseInt(args[3]);
int e=Integer.parseInt(args[4]);
int f=Integer.parseInt(args[5]);
if(args.length!=6){
System.out.println("Bitte 6 Zahlen eingeben!");
return;
}
else{
System.out.println("funktioniert");
}
}
}