What is the difference & performance between (ObjectClass not extend from String)
ObjectClass myObject = new ....
Method 1
String iString = "" + myObject;
Method 2 - ObjectClass not extend from String, i know it will be "ClassCastException" but assuming it's extend from String, what better ?
String iString = (String)myObject; //will fail?
Method 3
String iString = String.valueOf(myObject);
Method 4
String iString = myObject.toString();