The value 3.2 is of what type (double or String). If it is 'double' then is it possible to typecast 'double to String'. If it String then please explain why it is String.
Where possible Java will use the toString() method on the object in such cases. As Object has a toString() method on it this will be called if no custom version has been provided.
Comment