code: public String isChecked(String value1, String value2) {
  
          if ((value1 == null) || (value2 == null)) {
              return "";
          }
  
          if (value1.trim().equalsIgnoreCase(value2.trim())) {
              return "checked";
          }
  
          return "";
      }
docs: Over simplistic helper to compare two strings to check radio buttons.
  
  @param value1 the first value
  @param value2 the second value
  @return "checked" if both values are equal, the empty String "" otherwise