I read about properties and resource bundle. But I was unable to get difference between these. When to use Properties file and when to use Resource bundle.
To load properties file use the following code
Properties tempProp = new Properties();
FileInputStream propsFile = new FileInputStream(xyz.properties);
tempProp.load(propsFile);
To load Resource bundle
ResourceBundle labels =
ResourceBundle.getBundle("xyz", currentLocale);
Enumeration bundleKeys = labels.getKeys();
In both of the cases (in resource bundle and in Properites) we are using properties file. The one difference I found is that to store application specific data we use properties file and to use i18n data we use resource bundle. I don't know whether i am right or not.
I would like to know the use of the above two. What is the difference between these two.