public static void main (String... args) { double fuellstand; double verbrauch; try { fuellstand = Double.parseDouble(args[0]); } catch (NumberFormatException e) { fuellstand = 50; System.out.println("Kein Füllstand angegeben, benutze 50"); } try { verbrauch = Double.parseDouble(args[1]); } catch (NumberFormatException e) { verbrauch = 6; System.out.println("Kein Verbrauch angegeben, benutze 6"); } // weiter }