I can\'t seem to understand why when I use println method on the quarter object, it returns the value of the toString method. I never called the toString method why am I g
Because this is how this function operates: it formats the primitive types for you, but when you pass it an object, it will call .toString() on it.
.toString()
If you don't override it, it will output the default .toString() implementation (Class@somenumber) which is not really useful...
Class@somenumber