Here you can find the source of getFormattedString(String key, Object arg)
public static String getFormattedString(String key, Object arg)
//package com.java2s; //License from project: Open Source License import java.text.MessageFormat; import java.util.MissingResourceException; import java.util.ResourceBundle; public class Main { private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle .getBundle("cucumber.eclipse.editor.<PropertiesFilename>"); public static String getFormattedString(String key, Object arg) { return MessageFormat.format(getString(key), new Object[] { arg }); }//from w w w. ja v a2s. co m public static String getFormattedString(String key, Object[] args) { return MessageFormat.format(getString(key), args); } public static String getString(String key) { try { return RESOURCE_BUNDLE.getString(key); } catch (MissingResourceException localMissingResourceException) { } return '!' + key + '!'; } }