I have a Java properties file defined as something like:
Property.1=value1
Property.2=value2
...
There could be any number of properties here.
I am familiar with how to read and use Java Properties, but I am not sure how I would code reading properties when I don’t know the number of them. My idea of pseudo-code would be something like:
// Somehow get the number of properties
for (int i=0; i<properties.size(); i++ {
prop.getProperty("Property"+i);
...
}
Does anyone know how to read a variable number of properties?
If your properties are numbered sequentially as your example suggests: