Java System setProperty() MethodThe setProperty() method of Java system class sets the property of the system which is indicated by a key. Syntax:Parameters:key - It is the name of the system property. value - It is the value of the system property. ReturnsThis method returns the System property's previous value. If System Property does not have any previous value, this method returns null. Exceptions
ExampleTest it NowOutput: Pervious property : {name=Shubham Jadon} New property : {name=Jadon Shubham}
Next TopicJava System
|