Java Object to String objToString(Object[] obj)

Here you can find the source of objToString(Object[] obj)

Description

obj To String

License

Apache License

Declaration

public static String[] objToString(Object[] obj) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static String[] objToString(Object[] obj) {
        if (obj == null)
            return null;
        String[] str = new String[obj.length];
        for (int i = 0; i < obj.length; i++) {
            str[i] = obj[i].toString();//from   w ww  . j a  va2s. c  o  m
        }
        return str;
    }

    public static String objToString(Object obj) {
        if (obj == null)
            return "";
        else
            return ((String) obj).trim();
    }
}

Related

  1. objectToString(Object[] obj)
  2. objectToStringNoNull(Object obj)
  3. objToString(Object obj)
  4. objToString(Object obj)
  5. objToString(Object obj)
  6. toString(Object o)
  7. toString(Object obj)
  8. toString(Object obj)
  9. toString(Object object)