Here you can find the source of getMessage(ResourceBundle bundle, Object key, Object[] params)
public static String getMessage(ResourceBundle bundle, Object key, Object[] params)
//package com.java2s; //License from project: Apache License import java.text.MessageFormat; import java.util.ResourceBundle; public class Main { public static String getMessage(ResourceBundle bundle, Object key, Object[] params) { String pattern = bundle.getString(key.toString()); if ((params == null) || (params.length == 0)) { return pattern; }//ww w. jav a2s .c o m return MessageFormat.format(pattern, params); } public static String getMessage(ResourceBundle bundle, Object key, Object param1) { return getMessage(bundle, key, new Object[] { param1 }); } public static String getMessage(ResourceBundle bundle, Object key, Object param1, Object param2) { return getMessage(bundle, key, new Object[] { param1, param2 }); } public static String getMessage(ResourceBundle bundle, Object key, Object param1, Object param2, Object param3) { return getMessage(bundle, key, new Object[] { param1, param2, param3 }); } public static String getMessage(ResourceBundle bundle, Object key, Object param1, Object param2, Object param3, Object param4) { return getMessage(bundle, key, new Object[] { param1, param2, param3, param4 }); } public static String getMessage(ResourceBundle bundle, Object key, Object param1, Object param2, Object param3, Object param4, Object param5) { return getMessage(bundle, key, new Object[] { param1, param2, param3, param4, param5 }); } }