Java ResourceBundle .getBundle (String baseName, Locale locale)
Syntax
ResourceBundle.getBundle(String baseName, Locale locale) has the following syntax.
public static final ResourceBundle getBundle(String baseName, Locale locale)
Example
In the following code shows how to use ResourceBundle.getBundle(String baseName, Locale locale) method.
import java.util.Locale;
import java.util.ResourceBundle;
//from ww w . jav a2s. c o m
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 »