Java Class Constructors

Why does the output also show memory/storage location (encircled with red ink on rightmost screen) when I didn’t write the code for it in this exercise (Link to exercise:

lemonadeStand is of type Store. You do not define a toString() method for objects of type Store, so it uses the standard Object toString() method…

So when you call System.out.println(lemonadeStand), it outputs the type and memory location in format type@memoryLocation.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.