Core Java

Object, equals and hashCode, packages, nested classes, enums, records and annotations.

10 notes

Notes

Java

Enums in Java

An enum is a class with a fixed set of instances, which makes an invalid value impossible rather than merely unlikely.

Read more
Java

Records in Java

A record declares an immutable data carrier, and the compiler generates the constructor, accessors, equals, hashCode and toString.

Read more