I know its a bad question, but just wanted to know. We have property files (.properties) in java, where we can read and write using Java.util.Properties class. I am able to use the same Java.util.Properties class to read and write file with different extension like .dat , .ini which has key-value pair. Do we have any potential difference when .dat or .ini file is read using Java.util.Properties when compared to having file as .properties.
Share
I don’t find the question stupid at all.
No, loading properties from a File via
Readeror viaInputStreamdoes not care what the name of the underlying file is (in fact there doesn’t have to be an underlying File at all).The only difference is that only .properties files are picked up automatically by the
PropertyResourceBundlemechanism.