/** * @param strNumber number as String type. * @return number as Integer type. */ private int getNumber(final String strNumber) { int number; try { number = Integer.parseInt(strNumber); } catch (NumberFormatException exception) { exception.printStackTrace(); return -1; } return number; }