LinkedList<HashMap<MyFancyBusinessObject, String>>> is the culprit.
Also something I don't like with Java is that it is a lot of ceremony to actually start a new greenfield project or script in it. My favorite experience with this sort of thing is Racket where I just launch DrRacket (after ONE very easy install on any platform), start writing my program, and hit run. I don't even need to save my program if I don't want to (it does autosave though so you probably won't lose your program even if DrRacket crashes!).
To be fair to Java though, jshell is a very nice REPL which is surprising for a language like Java. It is actually my preferred way to do one off date calculations since most languages don't seem to have a nice way to do date arithmetic built into the language itself.
The situation with one off scripts is something that could really be improved in Java by having a dialect which just runs the file top to bottom like C# recently did with top level programs.
If you like jshell, you should give jbang a try: https://www.jbang.dev/. It allows you to write “scripts” in Java and you can easily use any 3rd party library.
Ironically, but when you open your ex-colleague's code 5 years later, you would easily guess Foo, but you would be very thankful for LinkedList<HashMap<MyFancyBusinessObject, String>>> type definition.
Not exactly what you want, but if you do have a class with a main function, you can sorta run it like a script with `java Main.java`, and it will compile it automatically and run it.
LinkedList<HashMap<MyFancyBusinessObject, String>>> is the culprit.
Also something I don't like with Java is that it is a lot of ceremony to actually start a new greenfield project or script in it. My favorite experience with this sort of thing is Racket where I just launch DrRacket (after ONE very easy install on any platform), start writing my program, and hit run. I don't even need to save my program if I don't want to (it does autosave though so you probably won't lose your program even if DrRacket crashes!).
To be fair to Java though, jshell is a very nice REPL which is surprising for a language like Java. It is actually my preferred way to do one off date calculations since most languages don't seem to have a nice way to do date arithmetic built into the language itself.
The situation with one off scripts is something that could really be improved in Java by having a dialect which just runs the file top to bottom like C# recently did with top level programs.