Why do we use .properties file instead of .txt file?
Answers
Answered by
2
In XML you can store more complex (e.g. hierarchical) data than in a properties file. So it depends on your usecase. If you just want to store a small number of direct properties a properties file is easier to handle (though the Java properties class can read XML based properties, too).
It would make sense to keep your configuration interface as generic as possible anyway, so you have no problem to switch to another representation ( e.g. by using Apache Commons Configuration) if you need to.
It would make sense to keep your configuration interface as generic as possible anyway, so you have no problem to switch to another representation ( e.g. by using Apache Commons Configuration) if you need to.
Similar questions
Math,
7 months ago
Hindi,
7 months ago
Math,
7 months ago
English,
1 year ago
Social Sciences,
1 year ago