Loading up and using MessageBundles

Create your messages_en.properties with your messages as a key value pair

greeting_hello=Hello {0}

Now in code use the following

ResourceBundle resourceBundle= PropertyResourceBundle.getBundle("messages_en.properties");
String message = resourceBundle.getString("greeting_hello");
MessageFormat messageFormat = new MessageFormat(message);
String formattedMessage = messageFormat.format("Markzi");
System.out.println(formattedMessage);

This will print out Hello Markzi