In my code, i will be passed one id value, I will have to read the properties file to get the id's corresponding name and value properties. Can any one tell me how i can write the java code to accomplish that?
I wrote something like this, but apparently this doesn't work because it seems like the keys contains only unique values and my property file has more than key.
//inputId is the input id value for which i am trying to match the name and dept
Enumeration<Object> enuKeys = properties.keys();
String key = null;
String value =null;
key = (String) enuKeys.nextElement();
value = properties.getProperty(key);
System.out.println("value is "+value);
System.out.println("id is "+id);
System.out.println("values are equal");