private static String formatTo2Digits(String str){
  if (str.length() < 2) {
    str="0" + str;
  }
  return str;
}

private static String formatTo2Digits ( String str ) { if ( str . length ( ) < 2 ) { str = "0" + str ; } return str ; }
makes values consist of 2 letters " 01 "
