List<Account> accounts = List.of(new Account(1), new Account(2));
var accounts = List.of(new Account(1), new Account(2));
It just reduces visual noise and boilerplate that you already know.Java 8 is also a slow and old runtime. It performs terribly in 2025. Here’s a quote from 2020 and the gap has only gotten wider [0]:
> JDK 8 is an antiquated runtime. The default Parallel collector enters huge Full GC pauses and the G1, although having less frequent Full GCs, is stuck in an old version that uses just one thread to perform it, resulting in even longer pauses. Even on a moderate heap of 12 GB, the pauses were exceeding 20 seconds for Parallel and a full minute for G1. The ConcurrentMarkSweep collector is strictly worse than G1 in all scenarios, and its failure mode are multi-minute Full GC pauses.
You’re doing a disservice to everyone by continuing to use and glorify it.
[0] https://hazelcast.com/blog/performance-of-modern-java-on-dat...