Top 10 Interview Questions to tell Senior Java Developer from Junior

Senior Java Developer vs Junior Java Developer

There are no strict time frames for when a Junior Java Developer becomes a Senior Java Developer. The boundary is very fluid and often difficult to perceive, which is why we have decided to ask our CTO – Alex Ptashny, a Java Developer with more than 25 years of experience in Java. These questions may make the process easier and help choose the most suitable person for the given project! A developer that meets all the requirements listed below can be qualified as a Senior Developer.

Years of experience

In the logical studies of math there is a term called “necessary but not sufficient condition”, which describes what is the condition that has to be met in order for some logical problem to be true or false, but at the same time does not guarantee it.

Years of experience in a very relevant example of such a situation in software engineering. A Senior Developer must have at least 5 years of experience, but at the same time, it’s not the years of experience that makes somebody a Senior. There can be a developer with 5 years of experience who is Senior and at the same time, there may as well be a developer with 15 years of experience who is still not a Senior.

However, we are quite convinced that no Developer can be called Senior unless he has at least 5 years of commercial experience.

That being said if somebody ever tries to “sell” you a Senior developer with 3 or 4 years of experience, rest assured it’s a scam or an attempt to paint a Junior or Regular Developer to look like a Senior.

Business understanding of the industry

Another common thing for all Senior Developers is business understanding. One of the things that makes an engineer a Senior is not limiting his understanding only to the narrow area of his technical responsibilities, but understanding how the solution that he’s engineering should be embedded in the industry, acknowledging its business context and understanding the business value it should provide to the client or the end user. And then, further on, incorporating this understanding into how the solution is crafted.

Therefore, a question I always ask my candidates is: tell me about the most recent industry for which you developed software or engineered some specific solution. What is so specific about this industry? What surprised you? What business value the solution that you developed was meant to provide? How did it change the way in which you approached your work on this project? How would you compare this industry to other industries you worked with in the past?

The answer and the provided level of business understanding of the industry the candidate worked for most recently will help me either put a 1 or 0.

Questions during the recruitment process

Question about Logical thinking

I believe every Senior Java Developer should have a highly developed logical thinking. In their work, they need to understand not only the small functionality or piece of code they are writing but the entire chain of events it will trigger now and in the future as well as their mutual dependencies.

How can you assess someone’s ability to think logically? There are many ways, but one of my favorite ones is asking questions that illustrate the speed of thinking, the thought process that goes in their mind and overall intelligence.

For example, I often ask some of the following questions:

  • What will be the next number in the sequence 1, 4, 9, 16, 25...? (or any other non straight forward sequence)
  • There is a big cube with an edge 1-meter long, full inside. It is made of smaller cubes, each with an edge 1-centimeter long. How many smaller cubes does the big cube consist of?
  • Tomato and cucumber cost $1,10 together. Tomato is $1 more expensive than cucumber. How much does the cucumber cost?
  • Is this equation correct? 1 dollar = 100 cents = 10 cents x 10 cents = $0.1 x $0.1 = $0.01 = 1 cent

Yes, I know what you’re thinking. All the questions above look very simple or even trivial. But tell you what, less than 25% of developers I interview give correct answers (if any) to them.

That’s why, although a candidate giving correct answers to them doesn’t mean to me that he/she is Senior, a candidate not giving correct answers to them is surely not a Senior, in my opinion.

Understanding how the code works

A Senior Java Developer can also be distinguished from a Junior based on their understanding of what a specific chunk of code does. A Junior Java Developer may be able to write code and run it through a compiler to see what it will do, while the Senior developer can pretty much “compile” it in his head.

What I mean by that, is that Junior developer will probably know what the code will do, but a Senior developer will know how it will do it. That being said, he is able to explain his reasoning for why he wrote the code in a specific way.

Therefore, I always ask the candidates to open any code editing program and ask them to write a very simple line of code with a few variables and explain to me what it does.

Then, I ask them to do a few little changes in the code and explain to me what it will do now, without compiling it. That way I evaluate how well they understand not only the technology but the programming overall.

I reiterate it several times, always adding a small changes that makes it even harder. Usually I make between 4 - 7 iterations and based on how far a person I get another hint on whether the candidate is either at Trainee, Junior, Regular, Senior or Tech Lead level.

Question about school performance

Now that’s a good one. It’s totally subjective. There is no research whatsoever that would correlate the school performance with a Java Developer’s performance nor with a probability of becoming a Junior, Regular or Senior developer.

However, over my 25-years long career of hiring developers, I have noticed a specific correlation between school performance (and grades) and a person’s performance as a developer.

Usually, the candidates who performed well in their school and during their university years have turn out to be a much more probable fit for a Senior position than candidates who performed poorly. I’d say that this rule turned out to be true for 80% of the candidates I hired. My personal opinion is that if a candidate for a Senior Java Developer had poor grades in school, it tells a little something about their responsibility, dedication, consistency and ability to deliver, all of which are necessary for someone to be claimed a Senior Developer. If they didn’t strive for excellent results in school, it’s likely that they won’t strive for them in their role as Senior Java Developers either.

Then again, there are still these 20% who performed substandardly at school but turned out to be amazing developers. However, when it comes to such guys and prodigies, you can usually tell that they’re the next big thing by other factors that they’re likely to succeed.

The biggest challenge in work

We all face challenges as Engineers, it’s the nature of this job. What’s important to me when hiring a Developer or pretty much anyone for an engineering position is how these challenges are overcome.

Therefore, I always ask: what was the biggest challenge in your career and how did you overcome it?

It’s very important for me to understand:

  • If the candidate is aware of the challenges he/she had
  • Aware of what caused them
  • How he solved it

What is even more important than the answer itself, is the way this question is answered. For, example: I will much more value a candidate who explained and shown understanding of the challenge he faced and admit that he failed it over a candidate who will just briefly describe the issue and the solution without demonstrating a detailed understanding.

Even if someone responds that they didn’t handle the situation well but learnt this and that, it makes the person much more legit in my eyes than a person who describes some superficial problem and very brief solution to it.

A Senior developer is someone who constantly learns and is not familiar with the term “I’m skilled enough, I don’t have to learn”.

Creation of an estimate for a small project

That’s a good one too, one of my favorites. We all hate estimates, we all know how many different factors the delivery time of a specific task depends on.

Therefore, I always ask this question: Let’s say you have to develop a very simple phone book. It should allow adding contacts consisting of name, surname and phone number and displaying them as a list. Additionally, it should enable searching the records by name, surname and phone number, as well as to sort every column (name, surname, phone number) A → Z and Z → A.

How much time will it take you to develop such application?

And here’s where my favorite part starts. Below you can find typical answers that developers who later turn out to be Junior / Regular / Senior give:

  • Juniors
    • “There is too little information, it’s impossible or difficult to estimate it.”
    • “What frameworks should be used for it?”
    • “It will take around 1-2 weeks”
    • “I don’t know, I didn’t take care of the estimations in my company”
    • “It totally depends on exact design, full discovery workshops should be done prior to giving any estimation”
    • Etc. Generally, the common thing for their answers is that they are either very reluctant to give any estimate or if they finally give it, it’s either dramatically over or underestimated.
  • Regulars
    • “What frameworks should be used for it? Should it be SPA? Can I use Angular?”
    • “It should take around 4-5 days”
    • “I need a bit more information”
    • “It depends on the design”
  • Seniors
    • “It will take me 1 day if the frontend can be in plain HTML. 2 days if you want some SPA framework. Of course if you need some fancy stuff like implementing ElasticSearch it will take up to 1 week. If you want to further add Lambdas, additional validation methods (e.g. search based on minimum 80% input/record compliance level) and other fancy stuff then we need to have a longer meeting to understand the big picture and the details, but if it’s purely what you described than I’d say 1 day.”
  • Tech Leads
    • “Am I in a hidden camera or something?”

See where I’m going? The less experienced a developer is, the more excuses he will find. More experienced developers will just give you probably a few versions of an estimate, starting from the simplest solution and going through more complex ones to acknowledging that indeed it may require a sitdown to determine the estimate. But they will give you you a valid estimate based on a common sense. The frameworks / language to be used will make no big difference to them.

Knowledge of other programming languages

Another thing that distinguishes a Senior Java Developer from a Junior in my opinion is their knowledge of other languages in addition to Java, such as MySQL, C#, JavaScript or pretty much any other language. A Junior Java Developer will usually only have experience with one language throughout their career and have no clue about the others.

On the other hand, the Senior Developer has most likely already had some experience with other programming languages at least on a basic level, i.e because he needed some endpoint from the frontend developer and didn’t want to wait until he’d come back from sick leave.

Therefore, I always ask if a candidate knows other languages (for example, PHP or Python) and how he worked with them in the past.

Code optimization

Every time when I’m interviewing for a Senior Java Developer position, I always give the candidate the “Code optimization task”.

Specifically, I have a pre-prepared very small piece of code which is intentionally broken in a few places, poorly structured and generally in a bad shape.

The task that the candidate is given, is to understand from that code what it should be doing and then refactor it in the best way he can.

That way, I evaluate how well does that candidate understand the code, what is his though process is, how he processes the information and most importantly how well he can refactor this code.

This skill is important for me, because every time we take over either a legacy project or a project that was failed to be delivered by other company, there are always the Senior Developers who investigate and refactor it. Thus, the ability to understand, fix and refactor a poorly-written code is a must-have to me for a Senior Developer.

Soft skills and communication

Amazing engineering skills do me no good if a person doesn’t communicate well. In fact, I prefer to work with average-experienced engineers who communicate well rather than with highly-skilled engineers whose communication skills are poor. Historically, most of the problems I ever had to solve were much more often a result of poor communication than poor engineering skills.

That being said, strong communication skills is a must for me to qualify the candidate as a Senior and I always pay close attention to how concise the responses are, how structured the communication is. The ultimate KPI I use for measuring it is simply a number of follow-up questions I had to ask because I didn’t understand something.

Furthermore, how they communicate is usually how they structure their thoughts, and how they structure their thoughts is usually how they structure their code.

So, communication means a lot. And to be clear, I am not expecting a programmer to be a rockstar (we leave it to sales guys) - we expect them to communicate in a clear manner - acknowledging the understanding of what needs to be done and getting understood when they communicate.

Are you looking for Senior Java Developers who meet all the above requirements? Reach out to me.

Naturally, the great majority of developers in our company were hired by me, which means they possess a combination of the above skills.

If you’re looking for true Senior Java Developers, reach out to me at or schedule a call with our Sales Representative.

We don’t have clients

we have partners

We use cookies to improve your browsing experience on our website. By browsing our website, you consent to our use of cookies and other tracking technologies.