Java Object to String ObjectToString(Object x)

Here you can find the source of ObjectToString(Object x)

Description

Object To String

License

Open Source License

Declaration

public final static String ObjectToString(Object x) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public final static String ObjectToString(Object x) {
        return x.toString();
    }/*from w  w  w.  ja v  a  2  s.  c  o m*/

    public final static String ToString(Object x) {
        if (x == null) {
            return "null";
        }
        return x.toString();
    }

    public final static String ToString(boolean x) {
        return String.valueOf(x);
    }

    public final static String ToString(long x) {
        return String.valueOf(x);
    }

    public final static String ToString(double x) {
        return String.valueOf(x);
    }
}

Related

  1. objectToString(Object obj)
  2. objectToString(Object obj, String defaultvalue)
  3. objectToString(Object object)
  4. objectToString(Object object, String defaultValue)
  5. objectToString(Object objectStr)
  6. objectToString(Object x)
  7. objectToString(Object[] obj)
  8. objectToStringNoNull(Object obj)
  9. objToString(Object obj)