當使用System.getProperty獲取系統屬性時,如果屬性不存在,則可以使用第二個參數來設置默認值。例如:
String propertyValue = System.getProperty("propertyName", "defaultValue");
如果系統屬性"propertyName"不存在,則propertyValue將被設置為"defaultVlaue"。