Your Guide to Clear Java Developer Interview in 2024.

Ajay Rathod
9 min readFeb 24, 2024

Hello to all my 7k+ followers, thank you for all the support. Whenever I see layoff news, I always tell myself to be interview-ready so that I can easily sail through it. I have conducted more than 100 interviews and have also appeared for more than 100 Java interviews. Based on that experience, I am writing this article. From my experience, I know that each MNC’s Java interview follows one typical pattern I will discuss later in this article. If you have had enough interviews, you must have noticed that the questions and topics always get repeated in every typical Java developer technical round. I will talk about this format and use some questions from that topic to explain why they are asked and will always be repeated in every interview.

Are you preparing for a job interview as a Java developer?

Find my book Guide To Clear Java Developer Interview here Gumroad (PDFFormat) and Amazon (Kindle eBook).

Guide To Clear Spring-Boot Microservice Interview here Gumroad (PDFFormat) and Amazon (Kindle eBook).

Download the sample copy here: Guide To Clear Java Developer Interview[Free Sample Copy]

Guide To Clear Spring-Boot Microservice Interview[Free Sample Copy]

Disclaimer — I am Not talking about FAANG interview

Getting through an interview usually means tackling just two technical rounds. While chats with managers and HR are typically easier, it’s often the tech rounds where most people struggle.

Companies, especially big ones, and tech firms, usually set aside about an hour for each round of interviews.

Java is a vast subject with lots to cover. Alongside the basics, interviewers will likely ask about your projects, how you deploy them, coding tasks, understanding of key concepts, and things like cloud computing, Kubernetes, and other tech tools. There’s a lot to cover!

With only an hour, interviewers will focus on the important stuff, trying to cover as much ground as possible.

Here’s where we can shine: by preparing well, understanding the basics, and getting good at coding, we can ace these rounds. Interestingly, many questions tend to come up again and again in interviews, especially if you’ve had a few already or have followed my Java series.

So, let’s focus on getting good at the basics and practicing our coding skills. We’ll take it step by step, covering each topic thoroughly.

Let's say our 60 mins start now, let's assign 8–10 mins to each topic to cover the interview, and what type of questions I will ask as an interviewer.

Suppose I am hiring you guys,

Topic 1: Project flow and architecture

In this topic, I want to know if the candidate is experienced or not. If not, I will start questioning them about their project. I will inquire about its functionality, flow, and architecture. I’ll also ask about the tech stack and how it is deployed in production, as well as their role and contributions.

Typical questions will be like this in any interview,

Please tell me about your project and its architecture. Please explain it and draw the architecture, framework, and technology used.

Please write everything you know about your project somewhere so that you won't be grilled, Remember you are the only one who knows everything about the project be confident.

Topic 2: Core Java

Core Java is a vast topic and the interviewer has to stick to these topics,

Try to provide a thorough answer in this area, as Core Java is considered fundamental for a Java Developer. While not knowing any framework isn’t an issue, lacking knowledge of Core Java could pose a problem.

The below topics are important and mostly discussed in an interview

Topics:

  • String Concepts/Hashcode-Equal Methods
  • Immutability(custom immutable class and example in JDK)
  • OOPS concepts(all four pillars and solid principle)
  • Serialization (serialversionUUID)
  • Collection Framework/concurrent collection(they Hashamap, concurrent hashmap, ArrayList,HashSet)
  • Exception Handling(especially Runtime exception)
  • Multithreading especially Executor Framework which includes ThreadPool(deadlock, Thread-dump)
  • Java Memory Model(how objects, methods, and variable gets stored in each area of Java memory)
  • Garbage collection(working of it, how it garbage collects the object, algorithm used while doing it)

I am adding the reference on how the questions will look like

Question:

How does ThreadPoolExecutor work?
How do you create a custom immutable class? What are examples of immutable classes in Java?
What are hashCode() and equals()? If you have Object as a custom key in a map, what will happen? How to use it correctly?
What are deep copy and shallow copy?
What is CompletableFuture?
What is the Java Memory Model as per the latest Java version?
What is a concurrent collection?
What are the time/space complexities of HashMap, ArrayList, and LinkedList?
What algorithm is used by these Java APIs Arrays.sort() and Collections.sort()?
How do you create a custom annotation in Java?
What is CompletableFuture?
What are deep copy and shallow copy?
How do HashMap and HashSet work internally?
What is the use of String’s join() method?

The below article has most of the questions for your reference,

Topic 3: Java-8/Java-11/Java17

You should know important Features related to the newly added Java API.

You can refer to my article where I have documented all the features from Java8-java21

The below topics are important and mostly discussed in an interview

Topics:

  • Java 8 features
  • Default/Static methods
  • Lambda expression
  • Functional interfaces
  • optional API
  • stream API
  • pattern matching
  • text block
  • modules

Subsequently, you should know the version-wise update to answer the question, This will test how updated you are.

Virtual thread feature comes in Java 21 likewise sealed classes introduced in Java 17.

I am adding the reference on how the questions will look like

Questions:

What is new in Java 8/Java11/Java17?
What is a parallel stream in Java and how does it work?
What is the new improvement in the Java memory model, improvement in Java 8 hashmap?

Topic 4: Spring Framework, Spring-Boot, Microservice, and Rest API

This is again a huge topic so they have to stick to basic to advanced repeated questions, You will be tested against Spring Framework, Spring Boot, Microservice, and Rest API.

Failure to satisfy the interviewer on this topic may lead to rejections.

Topics:

  • Dependency Injection/IOC, Spring MVC
  • configuration, Annotations, CRUD operations
  • Bean, Scopes, Profiles, Bean lifecycle
  • App context/Bean context
  • AOP, Exception Handler, Control Advice
  • Security(JWT,Oauth)
  • Actuators
  • WebFlux and Mono Framework
  • HTTP methods
  • Microservice concepts
  • Spring Cloud
  • JPA

I am adding the reference on how the questions will look like,

Questions:

What is the use of these annotations — @RequestMapping @RestController @Serivice @Repository @entity

What is an Actuator and its uses?
How do you make your application fault-tolerant and resilient?
What is distributed tracing? What is the use of traceId and spanId in a Spring Boot application?
What is WebFlux and Mono Framework in Spring Boot?
What is a cyclic dependency in Spring, and how do you prevent it?
How to secure REST APIs?
What is distributed tracing? What is the use of traceId and spanId in a Spring Boot application?
What is WebFlux and Mono Framework in Spring Boot?
How to make your application fault-tolerant and resilient?
How do you disable auto-configuration in a Spring Boot application?

Related articles,

Topic 5: Hibernate/Spring-data Jpa/Database(SQL or NoSQL)

This Section deals with the Data Layer where Hibernate JPA frameworks come into the picture. If the interviewer is a Database guy he may grill you deeply because of the knowledge he possesses.

Be ready to write queries.

Topics You should be aware are,

  • JPA Repositories
  • Relationship with Entities
  • SQL queries on Employee department queries, Highest Nth salary queries
  • Relational and No-Relational DB concepts
  • CRUD operations in DB
  • joins, indexing, procs, functions,

Questions

What is the Difference between SQL and NoSQL?
What is sharding in databases?
What is JPA?
What is the Parent-Child Relationship?
What are joins?

Please find a related article for more help on this topic,

Topic 6: Coding

In the Java coding round, there is more emphasis is on writing code using stream API, hence I have added a couple of stream-related questions below.

Practice before going to an interview cause it can make or break your interview. they are easy ones if you practice well enough.

few articles related to it,

Topics:

  • Stream API coding Questions
  • Normal Coding questions related to String and Array
  • Sorting and searching using Java API.

Questions

Write a program to find the second-highest element from an array. The array can contain duplicate elements. Solve it using Java 8 streams.

Find the duplicate element and its occurrence in a given string using the Stream API.

Write a program to find the first non-repeating element from a given string using Java Streams.

Write a program to find unique elements in a given string using Java streams.

Write a program to find the longest string in a given array.

Write a program to sort two types of numbers to the left and right in an array. Example: Integer array[] = [5, 5, 0, 5, 0] -> output: [0, 0, 5, 5, 5]

Write a program to find the first repeating element/character from a given string using Java Streams.

Write a program for valid parenthesis.

WAP to find the duplicate characters in a list of strings using the Stream API?

Topic 7: Devops questions on deployment Tools(Kubernetes,Cloud,Kafka,cache)

These types of topics are mostly asked by managers or leads who are heavily working on it, That's why they may grill you on DevOps/deployment-related tools, You should have an understanding of common tools like Jenkins, Kubernetes, Kafka, Cloud, and all.

Questions:

What are POD, Configmap, Node, and cluster in Kubernetes?

What is a Hybrid cloud?
What is Apache Spark? Can you give me a use case using a Spring Boot application?
What is Kafka? How does it work? What are offset and consumer groups?

Topics 8: Best practice(Design pattern/Microservice pattern)

The interviewer always wanted to ask about some design patterns, it maybe Normal design patterns like singleton, factory, or observer patterns to know that you can use these in coding.

Microservice is heavily used nowadays, and with that different types of patterns also come into the picture like,

Circuit Breaker
SAGA
CQRS
Two-phase commit, BFF, API Gateway,

These patterns are commonly used, if you can satisfy them with these topics there will be an added advantage. Make sure you prepare them well in advance.

Question:

What is a Singleton design pattern, builder design pattern, or facade design pattern?
What are the common microservice patterns we should be using? Tell me about any two.
These topics always get repeated so by preparing them you can crack the final part of it.

Some related articles for reference,

Final Words

All these questions and topics always get repeated in every Java interview and the Interviewer has only one hour to ask these questions. If you have done the commonly repeated question you will easily crack the interview and get the job.

Thanks if you need more questions and topics for the Java interview you can always refer to my book where I have documented everything.

also, let me know which topic or questions are important and commonly repeated in each interview.

Thanks for reading

  • 👏 Please clap for the story and follow me 👉
  • 📰 Read more content on my Medium (50 stories on Java Developer interview)

Find my books here:

--

--

Ajay Rathod

Software Engineer @Cisco | Java Programmer | AWS Certified | Writer | Find My Books on Java Interview here - https://rathodajay10.gumroad.com/