Java System getProperty() MethodThe getProperty(String key,Stringdef) method of Java System class returns property of a system which is indicated by a specified key. SyntaxParameterkey - the name of the system property. def - a default value. ReturnsThis method returns System property or default value if there is no property with that key. Exception
Example 1Test it NowOutput: my name : Shubham Jadon Example 2Test it NowOutput: my name : null
Next TopicJava System
|