System.clearProperty(String key) has the following syntax.
public static String clearProperty(String key)
In the following code shows how to use System.clearProperty(String key) method.
//from w w w. j a v a 2s . co m public class Main { public static void main(String[] args) { String s = System.clearProperty("java.class.path"); System.setProperty("user.dir", "C:/java2s.com"); System.out.println(System.getProperty("user.dir")); } }
The code above generates the following result.