code: public static String format(String msgKey, Object... args) {
  
          try {
  
              return MessageFormat.format(getMessageString(msgKey), args);
  
          } catch (IllegalArgumentException iae) {
              throw new CompilerError(
                      "bundle contains invalid message format for key '" + msgKey + "'\n" + "error: " + iae.getMessage());
  
          }
  
      }
docs: Format a message corresponding to the given key and using the given arguments.
  
  @param msgKey key that identifies which message to retrieve
  @param args   arguments to use to complete the message
  @return localized String corresponding to the given key and arguments