Java tutorial
//package com.java2s; public class Main { public static String nvl(Object obj) { return obj == null ? "" : (("null").equals(obj.toString()) == true ? "" : obj.toString()); } public static String nvl(Object obj, String def) { return obj == null ? def : obj.toString(); } }