Here you can find the source of setProperty(Properties props, String keyword, Object value)
public static void setProperty(Properties props, String keyword, Object value)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static void setProperty(Properties props, String keyword, Object value) {/*from w w w. j av a 2 s . c o m*/ if (props != null) { String s = (value != null ? value.toString() : null); props.setProperty(keyword, s != null ? s : ""); } } public static void setProperty(Properties props, String keyword, boolean value) { if (props != null) props.setProperty(keyword, Boolean.toString(value)); } }