java - conditional statement in .properties file -
is there way can have conditional statement inside .properties file?
like:
if(condition1) xyz = abc else if(condition2) xyz = efg
no, it's not possible. file format freely available: http://docs.oracle.com/javase/6/docs/api/java/util/properties.html#load%28java.io.reader%29.
do in java code:
if (condition1) { return properties.getproperty("xyz.1"); } else if (condition2) { return properties.getproperty("xyz.2"); }
Comments
Post a Comment