public static int getInt(final String title, final int defaultValue) {
        int opt = -1;

        do {
            try {
                final String val = ConsoleMenu.getString(title + " (default:" + defaultValue + ")", null);
                if (val.length() == 0) {
                    opt = defaultValue;
                } else {
                    opt = Integer.parseInt(val);
                }
            } catch (final NumberFormatException e) {
                opt = -1;
            }
        } while (opt == -1);

        return opt;
    }