Happy Halloween!
I would like to know how to test a value of a property file.... it seems that making a variable equal to properties.getProperty("key") and then testing that sting value (assume the value is halloween) wont work...
example:
//imported necessary imports public void aMethod(){ Properties props = new Properties(); try{ props.load(new FileInputStream(new File("filename.properties")); value = props.getProperty("lastHoliday"); if(value == "halloween"){ System.out.println("BOO!"); } }catch(Exception e){ } }
in the properties file:
lastholiday=halloween
Do you need to test the value a different way?