package com.logicbig.example.system;
public class ClearPropertyExample {
public static void main(String... args) {
String property = System.getProperty("user.language");
System.out.printf("before clearProperty() : %s%n", property);
String s = System.clearProperty("user.language");
System.out.printf("clearProperty() returned : %s%n", s);
property = System.getProperty("user.language");
System.out.printf("after clearProperty() : %s%n", property);
}
}
Output
before clearProperty() : en
clearProperty() returned : en
after clearProperty() : null