The static valueOf
method in the String
class will do the null check and return "null"
if the object is null
:
String stringRepresentation = String.valueOf(o);
The static valueOf
method in the String
class will do the null check and return "null"
if the object is null
:
String stringRepresentation = String.valueOf(o);