Here you can find the source of valueOf(Object object, String defaultEmptyValue)
public static String valueOf(Object object, String defaultEmptyValue)
//package com.java2s; /**//from w w w. j ava 2 s . c om * <p> * Simple utility class for String operations useful across the framework. * <p/> * <p> * Some methods in this class were copied from the Spring Framework so we didn't * have to re-invent the wheel, and in these cases, we have retained all * license, copyright and author information. * * @since 0.9 */ public class Main { public static String valueOf(Object object) { return valueOf(object, ""); } public static String valueOf(Object object, String defaultEmptyValue) { if (object == null) { return defaultEmptyValue; } return String.valueOf(object); } }