Creating simple data classes in Java traditionally required substantial boilerplate code. Consider how we would represent Java’s mascots, Duke and Juggy: public class JavaMascot { private final String ...
Java SE 14 (March 2020) introduces records as a preview feature. Records aim to enhance the language's ability to model "plain data" aggregates with less ceremony. A record can be best thought of as a ...
In my two immediately previous posts, I looked at reducing the number of parameters required for a constructor or method invocation via custom types and parameter objects. In this post, I look at use ...