By default, the implementation of toString() calls hashCode . This has nothing to do with lists.
Here's a pretty minimal reproduction:
public class JSSTest { public static void main(String args[]){ JSSTest test = new JSSTest();
(You can override toString() to display before / super call / after details).
It is documented in Object.toString() :
The toString method for the Object class returns a string consisting of the name of the class whose object is the instance, the at-sign `@ 'character, and the hexadecimal representation of the objectโs hash code. In other words, this method returns a string equal to the value:
getClass().getName() + '@' + Integer.toHexString(hashCode())
source share