code: public static String formatAsPercentage(int value, int total) {
          // value '1F' is to force floating conversion instead of loosing decimal part
          float average = total == 0 ? 0 : 1F * value / total;
          return PERCENT_FORMATTER.format(average);
      }
docs: Returns value converted to percentage format.
  
  @param value value to convert
  @param total sum of all values
  @return converted values including '%' character