Here you can find the source of valueOf(Object obj)
Parameter | Description |
---|---|
obj | a parameter |
public static String valueOf(Object obj)
//package com.java2s; public class Main { /**// w w w .j a v a 2s . c o m * transform a Obejct 2 a String ,return value is "" when object is null * @param obj * @return * @author qiumm */ public static String valueOf(Object obj) { return (obj == null) ? "" : obj.toString(); } }