Skip to content

Glossary: Java Basics

toString

A method that decides how an object looks when printed or joined to a string. Writing your own replaces Java's unhelpful default such as `Product@2b4a2ec7`.

Where the book teaches it

Related terms

AnnotationRecord