public static boolean isPasswordValid(String value){
  return value != null && value.length() >= 8 && value.length() <= 20 && StringUtils.isAsciiPrintable(value);
}

public static boolean isPasswordValid ( String value ) { return value != null && value . length ( ) >= 8 && value . length ( ) <= 20 && StringUtils . isAsciiPrintable ( value ) ; }
returns true if the password is valid .
