The following code gives null as output. I am setting the property named color but I am not able to retrieve it. Where is the problem?
Properties defaults = new Properties();
Properties props = new Properties(defaults);
I'm assuming when you create a new Properties object that there are two methods put and get, as well as a constructor that takes a Properties object. When you call put, it takes two arguments - of type String. And when you go to retrieve the value of one of the instance variables using get you're passing a String again. The questions become, what are the types of your instance variables, what are their values after you use put and what is the correct function of get?