News for hackers. Stuff that matters.
Re:New language features since Java 8 to 17 by grishka on Sunday October 24, 2021 @05:01PM (#28981876)
Heh, getters and setters. An unpopular opinion, but imo you don't need them most of the time. Usually, a getter just returns a field and a setter just assigns it. If that's the case, and unless you're writing a public API of a library, just make the field public. Make it public final if it's read-only.

The difference between arrays and ArrayList is simple: an array has a constant size known at the time of allocation.

There are no comments on this comment yet.