Size vs Capacity in Java Collections
Size is the number of elements in a collection, whereas capacity is the size of the backing array.
Infinite Streams in Java
Infinite streams are similar to infinite loops but use a stream instead.
Spliterator in Java
Spliterators are used in Java streams and a way to process elements in parallel.
ListIterator in Java
ListIterator is a bidirectional iterator used in collections that implement the List interface.
Iterators in Java
Iterators are a way to traverse over the elements in a collection.
Arrays in Java
Arrays are a container object that contain a fixed number of elements of the same type.
Algebraic Data Types (ADTs) in Java
Algebraic Data Types can be built using sealed classes.
When to Choose Composition Over Inheritance
Choose composition for code reuse that doesn't require a class hierarchy.
When to Choose Inheritance Over Composition
Inheritance is best used for code reuse when modeling data.
Java Class Layout Standard
Standard layout each class should follow.