Here you can find the source of format(ResourceBundle bundle, String key, Object... args)
public static String format(ResourceBundle bundle, String key, Object... args)
//package com.java2s; //License from project: Apache License import java.text.MessageFormat; import java.util.MissingResourceException; import java.util.ResourceBundle; public class Main { public static String format(ResourceBundle bundle, String key, Object... args) { try {//from w ww . jav a2 s . co m String message = bundle.getString(key); return MessageFormat.format(message, args); } catch (MissingResourceException e) { return '!' + key + '!'; } } public static String getString(ResourceBundle bundle, String key) { try { return bundle.getString(key); } catch (MissingResourceException e) { return '!' + key + '!'; } } }