Here you can find the source of nvl(String instr, String defaultValue)
public static String nvl(String instr, String defaultValue)
//package com.java2s; //License from project: Apache License public class Main { public static String nvl(String instr, String defaultValue) { return instr == null || "".equals(instr) ? defaultValue : instr; }/*from ww w . j a v a2 s . co m*/ public static String nvl(String instr) { return nvl(instr, ""); } public static boolean equals(String str1, String str2) { if (str1 == null && str2 == null) return true; if (str1 != null && str1.equals(str2)) return true; return false; } }