How to use Java property files?

后端 未结 17 1147
时光取名叫无心
时光取名叫无心 2020-11-22 11:13

I have a list of key/value pairs of configuration values I want to store as Java property files, and later load and iterate through.

Questions:

  • Do I ne
17条回答
  •  伪装坚强ぢ
    2020-11-22 11:36

    In order:

    1. You can store the file pretty much anywhere.
    2. no extension is necessary.
    3. Montecristo has illustrated how to load this. That should work fine.
    4. propertyNames() gives you an enumeration to iterate through.

提交回复
热议问题