Why was Objects.toString added over String.valueOf?

108 Views Asked by At

In JDK 7, it appears that Objects.toString was added along with an overload. This method calls String.valueOf, and the Javadocs specify that they have identical behavior. My question why was this method added when String.valueOf does the same thing already?

0

There are 0 best solutions below