Java ResourceBundle .getString (String key)
Syntax
ResourceBundle.getString(String key) has the following syntax.
public final String getString(String key)
Example
In the following code shows how to use ResourceBundle.getString(String key) method.
/*from w w w .j av a 2 s . co m*/
import java.util.Locale;
import java.util.ResourceBundle;
public class Main {
public static void main(String[] args) {
ResourceBundle bundle = ResourceBundle.getBundle("hello", Locale.US);
System.out.println(bundle.getString("hello"));
}
}
Home »
Java Tutorial »
java.util »
Java Tutorial »
java.util »