> For the complete documentation index, see [llms.txt](https://heunnajo.gitbook.io/java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://heunnajo.gitbook.io/java/java.lang-package-and-useful-class/hashcode-tostring.md).

# hashCode(), toString()

**hashCode()**\
\- It returns hash code of object.\
\- hashCode() of Object class returns casting object address to int.\
\- Rule : if you do overriding equals(), should do overriding hashCode().\
\- System.identityHashCode(Object obj) is same as hashCode() of Object class.

**toString()**

\- It returns object to String.\
\- Object == iv group. **Object=>String** means iv **value=>String**
