Here you can find the source of getMessage(String key)
public static String getMessage(String key)
//package com.java2s; //License from project: Apache License import java.text.MessageFormat; import java.util.ResourceBundle; public class Main { private static final ResourceBundle resource = ResourceBundle.getBundle("errorCode"); public static String getMessage(String key) { return resource.getString(key); }//from w w w. j a v a 2 s . c o m public static String getMessage(String key, Object... arguments) { return MessageFormat.format(resource.getString(key), arguments); } }