Here you can find the source of null2String(String string)
public static String null2String(String string)
//package com.java2s; //License from project: Apache License public class Main { public static String null2String(String string) { return string == null ? "" : string; }//from w ww . ja v a2 s . c o m public static String null2String(Object string) { return string == null ? "" : string.toString(); } }