Java Null Value Convert null2Empty(Object obj)

Here you can find the source of null2Empty(Object obj)

Description

null Empty

License

Open Source License

Declaration

public static Object null2Empty(Object obj) 

Method Source Code

//package com.java2s;

public class Main {

    public static Object null2Empty(Object obj) {
        if (obj == null) {
            return "";
        }//w ww.j  a  va2s .  c o m

        return obj;
    }
}

Related

  1. null2Boolean(Object s)
  2. null2default(final String str, final String def)
  3. null2dots(Object s)
  4. null2Double(Object s)
  5. null2Double(Object s, double defValue)
  6. null2empty(Object s)
  7. null2empty(String str)
  8. null2emptyString(String value)
  9. null2Int(Object object, int def)