How To Delete Property From java.util.Properties
By Angsuman Chakraborty, Gaea News NetworkSaturday, August 23, 2008
This isn’t a trick question. For a long time you couldn’t delete a property from java.util.Properties class. In the recent versions too Java doesn’t reveal that it has added the functionality. However as java.util.Properties now extends Hashtable, you can delete a property by:
Properties.remove(key);
So effectively Properties is a persistent Hashtable which is limited to String key and value pairs only.
Discussion
May 1, 2009: 7:21 am
java.lang.Object This was the inheritance in Java 1.1 |
August 24, 2008: 12:23 am
I don’t remember using it earlier but I definitely don’t remember the exact version. I think it should be around 1.5 or later. |
Laird Nelson |
YOUR VIEW POINT
Herbert Helmstreit