Here you can find the source of formatMessage(String message, Object param1)
public static String formatMessage(String message, Object param1)
//package com.java2s; import java.text.MessageFormat; public class Main { public static String formatMessage(String message, Object[] params) { if ((message == null) || (params == null) || (params.length == 0)) { return message; }/*from w ww.j a v a 2 s . c om*/ return MessageFormat.format(message, params); } public static String formatMessage(String message, Object param1) { return formatMessage(message, new Object[] { param1 }); } public static String formatMessage(String message, Object param1, Object param2) { return formatMessage(message, new Object[] { param1, param2 }); } public static String formatMessage(String message, Object param1, Object param2, Object param3) { return formatMessage(message, new Object[] { param1, param2, param3 }); } public static String formatMessage(String message, Object param1, Object param2, Object param3, Object param4) { return formatMessage(message, new Object[] { param1, param2, param3, param4 }); } public static String formatMessage(String message, Object param1, Object param2, Object param3, Object param4, Object param5) { return formatMessage(message, new Object[] { param1, param2, param3, param4, param5 }); } }