ResourceBundle bundle = ResourceBundle.getBundle("messages", Locale.FRANCE); String greeting = bundle.getString("hello");In this example, we are loading the messages_fr.properties file and getting the value for the key "hello". If the file does not exist, ResourceBundle will fall back to the default file (messages.properties) or throw a MissingResourceException if there is no default. ResourceBundle is part of the java.util package library in Java.