I could actually answer all your questions until you got to swing/spring. I've tried to figure out the Java GUI a couple times with no joy. In my defense, I've made 1 GUI in my life. In Tcl/Tk. 30 years ago. Not much call for a GUI when you're intercepting TCP/IP packets to send/receive them via your custom PCI driver for your custom hardware
Well, I don't think no one's ever going to ask you about Swing in an interview (someone mentioned, but not about current interview questions). Swing is pretty much dead (except, ironically, in IntelliJ). Jobs where you do desktop GUIs in Java are rare too. I wouldn't worry too much, unless you really want one of those- and even for that positions, I assume they won't expect Java GUI knowledge in the interview.
Except for hashcode(), I'd never heard of that before. Then again, outside of strings I never compare objects.
Well, that's a basic one for "foundational Java"-type questions. Again, I think those are not much in style nowadays (I'm not saying whether it's good or bad to ask that. Just stating what I think is the market...).
But you also use hashcode/equals when you want to put a custom type of yours into a HashMap/HashSet (and other types). If those are not overriden properly, you won't get correct behavior in many cases.
Many places will automate the creation of them, or due to how they do things... never require that. Still, it's Java basics, but it wouldn't be surprising that even people with some commercial Java experience do not know about them.
But again, foundational question- I don't think it's super high probability you'll get that, but some of the posters above seem to ask about that on interviews... so it shouldn't be a big surprise (plus, it's all pretty logical, consistent, and easy to learn).
Why I didn't google "Java interview questions" before starting this I'll never know.
Well, I'm not sure it's easy to find a "reputable source" for that. Like here, I expect many lists of that to be "what I think are good Java interview questions" vs. what you want; "what is likely I'll be asked in a job interview".
My problem is Java isn't stuck in my head enough to pull things from memory. I consistently screw up the main() line. I can never remember if I want size() or length(), let alone .size or .length. I'm constantly googling "I need to foo", "I know how to foo, what are the arguments", etc. In other words, I know what I want to do, I'm just not sure of the library/method/whatever syntax.
There is some inconsistency in the stdlib (or things that make sense but seem inconsistent; arrays length makes sense as a "field", collections length needs to be a method).
However, for interviews, as long as you don't claim to be a Java expert... well, *I* think it shouldn't matter if you get the minutiae right- it's something you can google quickly or your IDE can take care for you, and it doesn't really affect much your capability as a developer. But some interviewers might not share my opinion. Hopefully, not a majority.
Don't even get me started on the import hell, I use vi and makefiles. I should learn an IDE one of these days.
Java is an IDE-friendly language. Many other languages *CANNOT* have an effective IDE (or at least easily. Pylance on VS Code is pretty good, but it's probably oodles more complex than a Java IDE)... so it's worth taking advantage of.
Imports are not really hell. Classes in Java are namespaced, so it's java.util.HashSet... you either use the fully-qualified name, or use an import to clarify what you mean. It's pretty different to a C include, or a Python import...
In other words, if I was interviewing you for a C position you could answer all the questions, but your code on the whiteboard would thumbs down you. Mostly because I wouldn't be asking questions like "what is diamond syntax", "what are generic types", "what are streams" etc. Instead I'd ask you to whiteboard code using these concepts.
"All interviews are broken". It's just down to personal preference. Whiteboard interviews have problems too. It's just a matter of what the interviewer prefers, and the current trends on interviewing. I think there are some formats which are harder/easier to prepare for. Whiteboard interviews (IMHO) are relatively easy to prepare for (e.g. read Cracking the Code Interview and do the exercises). I'd rather prepare for that than for Trivial Pursuit interviews.
TL;DR googling 'Java interview questions' did the trick, I'm trying to not use cut and paste nor google nor an IDE to get better. And I should learn Eclipse as it would solve a lot of problems, even though that learning curve is steeper than Java's.
I dunno- I've been using Eclipse for so long I don't have a clear picture of what's hard about it.
There are ways (IIRC) to get Eclipse's completion engine and stuff in Vim (perhaps Neovim?)... if you want to go down that path. Also VS Code might be simpler.
As it has been posted above... what you shouldn't be using is make. It's pretty hard to use make for Java. As others mentioned, I like Maven (although Gradle is popular on the Internet nowadays...). I'd give that a shot.