Java System.clearProperty(String key)

Syntax

System.clearProperty(String key) has the following syntax.

public static String clearProperty(String key)

Example

In the following code shows how to use System.clearProperty(String key) method.


/*  w w  w .  j a  v a2  s  .  com*/
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.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable