Default properties provide a clean way to specify alternative or default properties when a certain properties
are missing. This is expected behavior in all enterprise applications. The following example shows instantiating and accessing default Properties,
//If some property is missing in 'prop'
//and available in 'defaultProp' then
//it gets from 'defaultProp'
Properties prop = new Properties(defaultProp);
prop.setProperty("TWO", "333333");
// 111111 (value from default properties)
System.out.println(prop.getProperty("ONE"));
// 333333 (value from properties)
System.out.println(prop.getProperty("TWO"));
// null (value not found in properties & default properties)
System.out.println(prop.getProperty("FIVE"));
//Another alternative to specify default value
//when certain property is missing
System.out.println(prop.getProperty("FIVE", "555555")); //555555
}
}