The String.valueof(Object) method uses the output from Object.ToString()
The default behavior of this method is:
getClass().getName() + '@' + Integer.toHexString(hashCode())
All this is from the Java 1.4.2 documentation. I advise that you
download it. Sun has provided some of the most complete documentation
I have ever seen.
test code:
public class ValueTest{
int i;
String s;
ValueTest(){
i = 3;
s = "test";
}
public static void main(String[] args){
ValueTest t = new ValueTest();
System.out.println(String.valueOf(t));
System.out.println(t.toString());
}
}