// SumDouble.java

public class SumDouble {

    public static void main(String[] args) {
        double sum = 0;
        for (String argument : args) {
            StringBuilder number = new StringBuilder();
            for (char c : argument.toCharArray()) {
                if (!Character.isWhitespace(c)) {
                    number.append(c);
                } else {
                    sum += parseNumber(number); // method call
                    number = new StringBuilder();
                }
            }

            sum += parseNumber(number); // method call
        }

        System.out.println(sum);
    }

    static double parseNumber(StringBuilder number) {
        return number.isEmpty() ? 0.0 : Double.parseDouble(number.toString());
    }
}
