This day and age I wouldn't ask the same Java techology specific questions as before. I give them code review and system design, no matter the language
I think opinions are really useful. Here’s the kinds of things I like to ask: - what do you think about the var syntax? - what do you think are good or bad usages of streams? - what do you look for in a code review? - what’s your favourite/worst part of the language? - what’s your favourite/worst part of spring? - how do you keep up to date with modern language features? - how would you explain why you can’t use == to compare strings to a python dev? - what do you think is the ideal testing pyramid? -
I find these types of questions don't really work for newer devs (2-3 years, in the post). They just don't have enough experience to answer well. A lot of the time, they've simply followed the lead of senior devs in their first job.
Yes, I do interviews and I prefer questions that have no right or wrong answer (like "what's your favorite language feature and why?").
Some people, myself included, just don't do well in "test taking" scenarios like leetcode. Give me an open ended question though and I can prove to you how deep my knowledge goes.
Getting maximum value from your tokens is the real trick. And I’m begging my corporate overlords to invest in some open source models that we can run on an internal server.
Yep, if the question has a right and a wrong answer and leaves little to no room in between it better take no more than like 30 seconds of the interview.
You don't want to hire someone that studied Java interview questions and answers. You want to hire someone that can reasonably work their way to an answer when something is outside of their current knowledge set.
Most memorization/knowledge checks are a waste of time. Tech jobs are marked by continuous learning. It's only evidence of time passing. Use questions like that to help size fit for seniority.
How do you learn? What resources do you use?
Walk through design process of a sample system.
How do you keep skills up in our new AI world.
I haven't interviewed anyone in like 8 months though, so I'm not 100% on putting it into practice. I have said to HR that I want in person interviews moving forward because it's too easy to disguise cheating now.
What is your favorite new Java feature? What does it improve? or What do you like and don't like about the language?
This tells whether someone is actually interested and has an idea what's going on. The latter question shows whether someone is aware of trade-offs and has solid experience.
I try to find out how well the person is in solving problems with limited information. Probe their ability to learn new things. Discover their competency in software engineering principles and concepts. And lastly, what is their personality, we're a team after all.
I don't think I ever asked super Java specific questions. But I only interviewed senior+ candidates so I just assume it as a given that they know their tools.
But if I had to pick one: explain what an Interrupt(edException) is and how you'd handle it.
I’m not saying it’s a bad question, but I think it leaves little room for a detailed answer. If the developer knows the answer, they’ll tell you everything you need to know; if they don’t, they won’t say anything. I prefer questions with several layers, such as volatile or, if you don’t want a top expert, final. Those answers allow you to gauge the person’s knowledge more accurately.
There is plenty of room for a detailed answer. Depending on the candidate's experience, they can take it anywhere from the bare minimum that the question asked for, to how graceful shutdown should behave, including what to do with partial state. Deadlines, checking for interrupts at batch boundaries, propagating the exception depending on where in the code base your code sits etc. - there is loads to talk about.
What is volatile for? I can’t even begin to tell you how many people claim to be Java experts with thousands of certifications, yet are left at a loss for words.
I've been a Java developer for 25 years, and I've never used `volatile`. I can explain what it's for, and sometimes I ask people "what's the difference between transient and volatile", but I don't think knowing what volatile is makes you a better developer or not. But most people who I interview have a hard time explaining what `final` means, which I think is a bigger problem.
I think his point is that for most Java developers in the corp world both are equally unused. 95% of what you need lives in the spring boot ecosystem and the kind of apps you create typically don't have an architecture that requires it i.e. stateless microservices deployed into K8's.
There are a few niche cases where it might be required but your typical Java developer working for a small/medium/corp business doesn't need to know it.
I live in the stateless microservices world and I've had to use volatile like once at best.
Stateless is pretty much the simple default, stateful is where shit gets tricky, you may have to know your concurrency details (but you probably stick to concurrenthashmaps or executor services)
On top of that, what real cases require managing threads by hand? most real production-grade implementations rely on Spring TaskExecutor or RXJava that really doesn’t require detailed understanding of threads.
You need to understand the primitives of concurrency. Locks, monitors, latches, volatile. At the very least on the database level because concurrency is everywhere in real production grade apps
I write my code mostly in Kotlin this days… co-runtimes have the same function than threads and archive functionally the same with no understanding of threads in vanilla JDK.
I guess you are somewhat right. But with every high level abstraction - there will be a point where you wonder what is going on and it helps to know the low level details.
That aside, imho database concurrency is an absolute must, you need to know optimistic, pessimistic locking etc. Because in my experience you can often push concurrency handling "down" to avoid having to deal with in-java concurrency (at least in your average business app) and I am still amazed how many "seniors" have no clue at all.
So to get back to the point: I can totally see how a jvm developer does not need to know what volatile actually does but you must at least know other mechanisms, abstractions really well.
There is an important distinction between knowing what volatile does internally and understanding the Java Memory Model. A developer might reasonably never need to implement low-level synchronization, but they cannot safely ignore the guarantees and limitations of the abstractions they use. But, I agree with you - low level understanding is always better than shallow understanding. I think the discussion has devolved into an unidimensional argument of what a good developer needs to know based on his/her understanding of threads.
Interviews that serve to boost the interviewer ego, I’ve seen those. They miss on really talented people that actually have talents that will be useful and not obscure understanding of things that will never be used in practice. Expert in threads that will write Spring boot apps 🫠
It’s important that experienced software engineers can reason about concurrency. In the context of Java, knowing about the JMM and volatile is a fair ask for a lot of jobs.
Just because something is "useless" (I don't think you actually know what that word means) doesn't mean you get to pretend it doesn't exist.
Most people don't have heart attacks or strokes very often, but knowing the warning signs might be the difference between living and dying. Even though they are "useless" 99.999% of the time.
You say 'volatile' is important to understand, and meanwhile python is #1 language by usage which till 3.14 was effectively single-threaded because of GIL.
In a typical corporate daily work using volatile is a super-edge-case.
Python and Java have different areas of application. The fact that Python did not support multithreading when it first appeared is irrelevant. If there is one area where Java is particularly powerful, it is in the ease of multithreading.
In a typical corporate daily work there are batch processes, and these are highly susceptible to improvement through multithreading. It's not a super-edge-case
Indeed. Simple question, hard to answer, especially when asking not to quote JMM but explain in practice how will volatile vs non-volatile field behave.
That is 99% of what is written in the typical corpo world these days though. Spring boot based microservices deployed into k8's or similar. If you have a team of developers it literally doesn't matter.
These people don't know shit about concurrency in general and it shows. Because guess what? State is somewhere, as your cool stateless app talks to a database.
If you know how concurrency works you can avoid r-then-w problems, etc. Java level or db level. This is a must if you call yourself senior.
I mean it's something people are able to avoid completely with ReentrantLock so I don't think it's a huge deal to not know that specifically. I think you'd be better served describing race condition program behavior and seeing (a) that they can label that a race condition and (b) that they can offer a solution.
I don’t agree. This is like a comment further down that says it can be replaced with synchronized; I’d say that ReentrantLock isn’t all that bad, but you wouldn’t use it where volatile is sufficient. Besides, if someone is familiar with ReentrantLock, they should know about volatile.
but you wouldn’t use it where volatile is sufficient
If both are sufficient, why not? I prefer explicit mutex handling by default. It makes it very hard for someone to read the code without noticing the thread safety concerns. And often if one field is volatile it's not uncommon that another needs to be as well. The lock is more efficient in that case because one dedicated mutex can cover reads and writes to both.
My point is you can know everything there is about concurrency in general it is still very possible to just not remember what volatile means. So it's much better to assess concepts.
Because if I’m using multithreading, it’s because I’m trying to optimize performance, and if volatile is enough, its performance will be much better than ReentrantLock. Why would I choose something slower?
Using the debugger to help figure out where an issue is during a live coding section can not be understated. Same with sharing your thought process out allowed.
The number of interviews where a candidate is almost silent and just staring at code isn't helping me evaluate you.
I do try and ask what they're thinking, or to remind them they have tests they can try, or I might even suggest "putting a break point there, and let's see what's going on". But the candidates that gravitate to that before being hinted to …chefs kiss.
Of course, read the room. If it's a little more like a pairing session, then they are also evaluating how you work with others and see how you think. Even if you way of thinking is different than there's, that's ok, it'll be how you navigate that and how receptive you are to different approaches. So speak up, ask questions, ask opinions.
If it's more old school leet code problems on a whiteboard… I'm sorry. Power through it. Still best to speak up and confirm any additional or varying conditions.
Not necessarily a Java centric question, but a typical icebreaker question I would typically ask, which libraries, APIs do you find interesting or enjoy using? It can lead to some interesting discussions and tends to ease into the interview.
Calling a stream with multiple chained method invocations a "single statement" is equivalent to saying you wrote a "single line" because you didn't add newlines after your semicolons. Technically true, but not true to the intent of the question/limitation.
I would be happy that you're interested in the concepts you've listed - although I'd not care about java 8. Java 17 is as far back as I'd go, so mentioning "java 8" feels like someone mentioning their interest in ISPF. :D
But what I'd be looking for in a strong developer for ANY language wouldn't be any of those things. My tricky questions would be around what you laugh about, what annoys you, how do you learn, how do you teach.
The mistakes candidates make with me are in refusing to try to get along. Someone who's upset that a discussion doesn't count L2 cache into account for simple tasks... I mean, I'm impressed if you know about that, I guess, that's definitely a thing, but if you can't accomodate people, if you're a jerk in an interview, if you can't teach, if you can't learn, if your pride gets in the way of working... then we're cool, I'll appreciate the time you took, but you're not passing my interview.
I can fix technical concerns. I can't fix someone's psychology, and a genius at code who wrecks the teams he works with is a net negative.
What is the main synchronization primitive that everything is built on? How to combine two optional values (not methods, but ways; open question). How to terminate the future? And what's interesting: after 10 years writing Scala and 10 years writing Java before, you can generate questions based on your Scala experience, and you know how to exploit Java in very different ways.
90% of the people I interview have already forgot how to write a unit test with mockito.
Depends what the salary is. For a midweight id be expecting you to be able to explain how to test different things and how to structure something so it was able to be tested and documented.
I’d ask you about secure coding practices, I’d give you a scenario and ask how you’d debug something.
How you do a code review, how you would do a 10k line change code review (send it back and tell them to do one).
Get on bealdung and make sure you can nail the basics. If they ask you to write a test and you can’t remember how to pass a stub in, it’s not a good look.
I'd give them a problem statement to talk on 10 mins prior or may be lesser time , give them pen paper to jot down and prepare notes, similar to how ielts speaking works where you get 2 mins to jot down thoughts and then you speak on it, keep the topic relevant around what the candidates are expected to prepare around for these system design interviews, be as thorough with requirements as possible because we need to be very thorough with explaining the requirements and listen to it. Seriously half of those Uber YouTube design interviewers themselves have mugged up the requirements and working. Ask the same interviewers to design CS GO and they will fail because they don't know how game servers work.
Hence better to see common points in general softwares that your projects need and are common outside of your industry hence the problem statement needs refining.
Target should be the thought process analysis, communication of what problem they understood, what they are thinking are possible solutions, give them hints or ask them what all they know around the answer you want to listen to or see why they discredit your version of the answer because no single design is correct answer.
Walk me through your resume or recent work history. Tell me about a project you worked on. How would you handle x problem? What are you like as a coworker?
Probably I need to know how good you are recognizing what is minimal and elegant, and also how good you are at top-down problem solving, like how you break down problems and how you approach their solutions. I would want you to have drive for minimalism and eye for good architecture and ability to trace the consequences.
What I don't need is, frankly, a developer. Knowing the minutiae of Java is less important than ever because of LLMs. I know my may seem like I'm taking the piss with your question, but world changed in 2026 and I think it's sensible to adapt to new reality. Knowing how to write Java and use its frameworks is just nice to have but it's now a less important item. This is also, by my estimation, the permanent situation: today, LLMs are cheap and fast enough even locally. You can run good enough AI systems as soon as you have about 128 GB of memory. I do not speak of any big cloud models when I say this. I run these on computers I own, which are nothing special. The only thing special about them is that they all have at least 128 GB of RAM.
To be honest, LLM can be just told to do minimal, elegant solutions as criteria it should observe, and to produce high level plan which you iterate down to higher detail. It's pretty much already capable of doing the whole thing. But I still think that at least in 2026, uncritical acceptance of LLM in everything would be a problem, and that the cybernetic organism of man and machine together can produce superior solution. I would want my candidate to understand the business domain they want to write programs in, research approaches to be taken together with LLMs, produce sensible first drafts with aid of LLM, and look it through critically for any problems that could be foreseen, but then generally get their hands off from the implementation, testing and reviewing loop. That part is nearly certain to be machine done by this time in 2027 in most workplaces. All that stuff you are preparing for is for the old world which mostly doesn't exist anymore. At most, it is a proxy for "generally smart person", maybe. Do you see what I'm getting at? It's just not particularly interesting anymore.
In this age of AI, I will not see if the candidate can write Java Program. Infact, I will focus on the problem solving attitude + whether the candidate can review the code generated by AI in the sense of solving problem accurately.
Replace Optional from Java 8+ features since it's so niche even the Java standard library barely uses it. It'd be more useful asking about interface, pattern matching, sealed, and record. You can know a lot more about a software engineer based on their ability to answer and apply these features into the codebase.
Anyone who can't justify why interface has some advantages over inheritance should not be considered for the job.
kinda hard to judge actual understanding from vague prompting. What do they do when they actually need to dig through the code themselves and do not know what they are doing?
I can tell you what ruby looks like, i know all the language agnostic programming concepts that you would be using in a role performing ruby, and I can write prompts... but I have no experience working with Ruby myself. Do you consider me a Ruby engineer just because I can get by with prompting?
How are you going to verify things like when the agent hallucinates a thread safety bug in code it has generated, or a resource leak and the developer lacks enough hands on experience to identify that?
I always ask how to get a value of a private field from a class you do not own (i.e. a library class). Most candidates start sweating at that point because the average Java developer can't write reflection code.
Note that there is a difference between knowing and using in production... Knowing some feature exists and when NOT to use it might be more important than knowing the feature itself.
I’d say that’s bad programming practice. Why on earth would I ask a candidate if they know how to write bad code? Do you ask someone if they’re capable of writing spaghetti code?
If a candidate can explain why it's a bad idea to do so, that's also noteworthy. But the question remains: can you do it? Turns out, most people can't.
61
u/DarthCaine 3d ago
This day and age I wouldn't ask the same Java techology specific questions as before. I give them code review and system design, no matter the language
27
u/Think-Round-7037 2d ago
I think opinions are really useful. Here’s the kinds of things I like to ask:
- what do you think about the var syntax?
- what do you think are good or bad usages of streams?
- what do you look for in a code review?
- what’s your favourite/worst part of the language?
- what’s your favourite/worst part of spring?
- how do you keep up to date with modern language features?
- how would you explain why you can’t use == to compare strings to a python dev?
- what do you think is the ideal testing pyramid?
-
98
u/SleeperAwakened 3d ago
"Which model do you prefer, and why?"
/s
20
u/mr_mlk 3d ago
How are you currently using AI?
The "walk me through your thinking" ones.
Trick questions? None, they add no value.
Tricky, see above.
Not asking for clarification. If you get a walk me through/design a thing question, clarify you understanding and ask relevant questions.
6
u/mellow186 3d ago
I've found you can filter out many candidates by determining if they understand that variables of class type are references passed by value.
4
u/aoeudhtns 2d ago
Most memorization/knowledge checks are a waste of time. Tech jobs are marked by continuous learning. It's only evidence of time passing. Use questions like that to help size fit for seniority.
How do you learn? What resources do you use?
Walk through design process of a sample system.
How do you keep skills up in our new AI world.
I haven't interviewed anyone in like 8 months though, so I'm not 100% on putting it into practice. I have said to HR that I want in person interviews moving forward because it's too easy to disguise cheating now.
3
u/mencretdimulut 3d ago
i always like someone who can do profiling and debugging, also able to do monitoring.
3
u/cryptos6 2d ago
What is your favorite new Java feature? What does it improve?
or
What do you like and don't like about the language?
This tells whether someone is actually interested and has an idea what's going on. The latter question shows whether someone is aware of trade-offs and has solid experience.
5
u/elmuerte 2d ago
I have never ever asked Java questions.
I try to find out how well the person is in solving problems with limited information. Probe their ability to learn new things. Discover their competency in software engineering principles and concepts. And lastly, what is their personality, we're a team after all.
6
u/_predator_ 3d ago
I don't think I ever asked super Java specific questions. But I only interviewed senior+ candidates so I just assume it as a given that they know their tools.
But if I had to pick one: explain what an Interrupt(edException) is and how you'd handle it.
9
u/Cantor_bcn 3d ago
What is
volatilefor? I can’t even begin to tell you how many people claim to be Java experts with thousands of certifications, yet are left at a loss for words.2
u/parnmatt 3d ago
Using the debugger to help figure out where an issue is during a live coding section can not be understated. Same with sharing your thought process out allowed.
The number of interviews where a candidate is almost silent and just staring at code isn't helping me evaluate you.
I do try and ask what they're thinking, or to remind them they have tests they can try, or I might even suggest "putting a break point there, and let's see what's going on". But the candidates that gravitate to that before being hinted to …chefs kiss.
Of course, read the room. If it's a little more like a pairing session, then they are also evaluating how you work with others and see how you think. Even if you way of thinking is different than there's, that's ok, it'll be how you navigate that and how receptive you are to different approaches. So speak up, ask questions, ask opinions.
If it's more old school leet code problems on a whiteboard… I'm sorry. Power through it. Still best to speak up and confirm any additional or varying conditions.
2
u/Paw565 2d ago
Do you hate hibernate and why yes 😅
3
u/Dependent-Net6461 3d ago
You all should live in incredible places. Candidates i usually find in interviews can barely explain differences between inheritance and composition..
3
u/viktorzub 3d ago
Ci/cd , monitoring, failed chooses etc
2
u/vintage_si 3d ago
Not necessarily a Java centric question, but
a typical icebreaker question I would typically ask, which libraries, APIs do you find interesting or enjoy using? It can lead to some interesting discussions and tends to ease into the interview.
2
u/cinlung 3d ago
I usually opens the interview with telling them to make the logic of printing stars
**********
*********
********
*******
******
*****
****
***
**
*
Only with pen and paper. If they pass this, I will ask another. Yes, many candidate I met failed.
1
u/HSSonne 3d ago
I would swift the main topic to communication skills.
1
u/josephottinger 3d ago
I would be happy that you're interested in the concepts you've listed - although I'd not care about java 8. Java 17 is as far back as I'd go, so mentioning "java 8" feels like someone mentioning their interest in ISPF. :D
But what I'd be looking for in a strong developer for ANY language wouldn't be any of those things. My tricky questions would be around what you laugh about, what annoys you, how do you learn, how do you teach.
The mistakes candidates make with me are in refusing to try to get along. Someone who's upset that a discussion doesn't count L2 cache into account for simple tasks... I mean, I'm impressed if you know about that, I guess, that's definitely a thing, but if you can't accomodate people, if you're a jerk in an interview, if you can't teach, if you can't learn, if your pride gets in the way of working... then we're cool, I'll appreciate the time you took, but you're not passing my interview.
I can fix technical concerns. I can't fix someone's psychology, and a genius at code who wrecks the teams he works with is a net negative.
1
u/raxel42 2d ago
What is the main synchronization primitive that everything is built on?
How to combine two optional values (not methods, but ways; open question).
How to terminate the future?
And what's interesting: after 10 years writing Scala and 10 years writing Java before, you can generate questions based on your Scala experience, and you know how to exploit Java in very different ways.
1
u/munchillax 2d ago
i'd rather evaluate them on how well they work with coding agents these days.
1
u/ishysredditusername 2d ago
90% of the people I interview have already forgot how to write a unit test with mockito.
Depends what the salary is. For a midweight id be expecting you to be able to explain how to test different things and how to structure something so it was able to be tested and documented.
I’d ask you about secure coding practices, I’d give you a scenario and ask how you’d debug something.
How you do a code review, how you would do a 10k line change code review (send it back and tell them to do one).
Get on bealdung and make sure you can nail the basics. If they ask you to write a test and you can’t remember how to pass a stub in, it’s not a good look.
1
u/quarentlne 2d ago
Ive never got questions related to java, only about my expererience
1
u/Sensitive-Door-7939 2d ago
I'd give them a problem statement to talk on 10 mins prior or may be lesser time , give them pen paper to jot down and prepare notes, similar to how ielts speaking works where you get 2 mins to jot down thoughts and then you speak on it, keep the topic relevant around what the candidates are expected to prepare around for these system design interviews, be as thorough with requirements as possible because we need to be very thorough with explaining the requirements and listen to it. Seriously half of those Uber YouTube design interviewers themselves have mugged up the requirements and working. Ask the same interviewers to design CS GO and they will fail because they don't know how game servers work.
Hence better to see common points in general softwares that your projects need and are common outside of your industry hence the problem statement needs refining.
Target should be the thought process analysis, communication of what problem they understood, what they are thinking are possible solutions, give them hints or ask them what all they know around the answer you want to listen to or see why they discredit your version of the answer because no single design is correct answer.
1
u/__konrad 2d ago
I would ask what it prints, why method args are ignored, and why println order affects reflection ;)
1
u/radio-nl 2d ago
“Why the heck don’t you write in Go??”
1
u/BullfrogCharming1202 3d ago
I would much rather they do some programming than answer questions about programming.
1
u/ddollarsign 2d ago
Walk me through your resume or recent work history. Tell me about a project you worked on. How would you handle x problem? What are you like as a coworker?
0
u/audioen 2d ago edited 2d ago
Probably I need to know how good you are recognizing what is minimal and elegant, and also how good you are at top-down problem solving, like how you break down problems and how you approach their solutions. I would want you to have drive for minimalism and eye for good architecture and ability to trace the consequences.
What I don't need is, frankly, a developer. Knowing the minutiae of Java is less important than ever because of LLMs. I know my may seem like I'm taking the piss with your question, but world changed in 2026 and I think it's sensible to adapt to new reality. Knowing how to write Java and use its frameworks is just nice to have but it's now a less important item. This is also, by my estimation, the permanent situation: today, LLMs are cheap and fast enough even locally. You can run good enough AI systems as soon as you have about 128 GB of memory. I do not speak of any big cloud models when I say this. I run these on computers I own, which are nothing special. The only thing special about them is that they all have at least 128 GB of RAM.
To be honest, LLM can be just told to do minimal, elegant solutions as criteria it should observe, and to produce high level plan which you iterate down to higher detail. It's pretty much already capable of doing the whole thing. But I still think that at least in 2026, uncritical acceptance of LLM in everything would be a problem, and that the cybernetic organism of man and machine together can produce superior solution. I would want my candidate to understand the business domain they want to write programs in, research approaches to be taken together with LLMs, produce sensible first drafts with aid of LLM, and look it through critically for any problems that could be foreseen, but then generally get their hands off from the implementation, testing and reviewing loop. That part is nearly certain to be machine done by this time in 2027 in most workplaces. All that stuff you are preparing for is for the old world which mostly doesn't exist anymore. At most, it is a proxy for "generally smart person", maybe. Do you see what I'm getting at? It's just not particularly interesting anymore.
-1
u/blue__rabbit 3d ago
How will you construct prompt to solve given problem
-1
u/pradeepngupta 3d ago
In this age of AI, I will not see if the candidate can write Java Program. Infact, I will focus on the problem solving attitude + whether the candidate can review the code generated by AI in the sense of solving problem accurately.
0
u/White_C4 2d ago
Replace Optional from Java 8+ features since it's so niche even the Java standard library barely uses it. It'd be more useful asking about interface, pattern matching, sealed, and record. You can know a lot more about a software engineer based on their ability to answer and apply these features into the codebase.
Anyone who can't justify why interface has some advantages over inheritance should not be considered for the job.
-5
u/hadrabap 3d ago
Why you didn't switch to Kotlin already? /s
-7
u/frinkmahii 3d ago
Give them Claude code or similar. Then a challenging issue.
Watch the prompts and the thinking and ask questions in the results.
Watch the process and evaluate their thinking and competency on checking the LLM result.
That’s what you need to hire for. Not esoteric issues.
-4
u/martinhaeusler 3d ago
I always ask how to get a value of a private field from a class you do not own (i.e. a library class). Most candidates start sweating at that point because the average Java developer can't write reflection code.