4 ms·
In Java, everything is a class. Java didn't even have generics when it was released. Any sort of higher-order functions and support for anonymous function were
by gavinray 5y ago
In Java, everything is a class.
Java didn't even have generics when it was released. Any sort of higher-order functions and support for anonymous function weren't introduced until Java 8 in 2014.
Language debuted 1995, generics in 2004 (almost a decade!), and lambda/FP facilities in another 20 years.
In Java, a public class has to have the same name as the file as well.
You had a very constrained design space historically and some non-negotiable enforced conventions.
It's similar to Go code, where most of it more-or-less looks the same and you can pick up most codebases and run with them if you're familiar with the language.