ResourceBundle.getBundle(String baseName, ResourceBundle.Control control) has the following syntax.
public static final ResourceBundle getBundle(String baseName, ResourceBundle.Control control)
In the following code shows how to use ResourceBundle.getBundle(String baseName, ResourceBundle.Control control) method.
//www . j a va2s. c om import java.util.ResourceBundle; import java.util.ResourceBundle.Control; public class Main { public static void main(String[] args) { ResourceBundle.Control rbc = ResourceBundle.Control.getControl(Control.FORMAT_DEFAULT); ResourceBundle bundle = ResourceBundle.getBundle("hello", rbc); System.out.println(bundle.getString("hello")); } }