Wenn ich diesen Code ausführen Zugriff:ArrayIndexOutOfBoundsException wenn args
public class Calc2 {
public static void main(String[] args) {
double result;
result = Double.parseDouble(args[0]) + Double.parseDouble(args[1]);
System.out.print(result);
}
}
ich dieses:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at Calc2.main(Calc2.java:4)
Post ** der Fehler **, kein schlecht abgeschnittener Screenshot des Fehlers. –
Siehe auch: http://StackOverflow.com/Questions/8756377/How-to-pass-command-line-arguments-to-main-method-dynamic –
Hier ist das vollständige Bild –