🌐
Reddit
reddit.com › r/java › conducted an interview for a senior java developer, where my questions too hard? (see inside)
r/java on Reddit: Conducted an interview for a senior Java developer, where my questions too hard? (see inside)
November 8, 2014 -

EDIT: Thanks guys for the feedback, this was very helpful. Clearly, I need to do some reading on effective interviewing strategies and I think I will adopt a more conversational rather than inquistorial style.

I wanted to make sure I asked in-depth questions that would demonstrated in-depth knowledge about what we need from a developer and the points I saw on the guy's resume (Java, Java EE, Spring, OOP, Hibernate, etc.). I had more questions in each section, but I had to skip past stuff because I wasn't getting answers I liked out of the guy.

Do you guys think these were reasonable questions to ask in an interview? I was really more interested in the candidates reasoning than knowing exact answers. This was a phone intervew. The guy gave me good "book" answers (sometimes seemed like he was reading from a book, hmm). But when I started asking "why?", he couldn't give good answers.

Some basic platform stuff:

  • List three Collections interfaces and the basic contract of each. List concrete implementations of each, how they differ, and performance characteristics in space and time.

  • Describe the contract of equals and hashCode. Why is it important that if you implement one, that you implement both?

  • What are generics? What is type erasure and what are the consequences? What are variance, covariance and contravariance? If blank stare: why can't you assign a collection with a generic type binding of a sub type to a reference to the same collection type binding of the super type? How do you specify the type binding of the super type to allow this? How do you specify the type binding to allow type-safe insertion?

Concurrency

  • Explain how notify and notifyAll work, and the difference between the two. Why prefer notifyAll to notify?

  • What is a deadlock and how do you avoid it?

  • What is a race condition and how do you avoid it?

  • What are some of the high-level concurrency classes provided by java.util.concurrent and how do they work?

Database

  • What are the different statement types and why would you use each?

  • How do you prevent SQL injection attacks?

  • What are transactions? What is ACID?

Hibernate

  • Give an overview of Hibernate and ORM. How do you load objects into the session? What does the session do with the objects while in the session? What is the difference between getting a persistent object from the session and querying for persistent objects?

  • When is it better to use plain SQL instead of ORM?

Java EE

  • How do you configure a DataSource in Weblogic to make it available using JNDI?

  • What are some ways for the client to obtain a reference to the DataSource from the app server? (Spring is not the answer I am looking for)

Spring

  • Give an overview of how Spring Dependency Injection container works. What is the purpose of DI? How to specify bean definitions? What are the different scopes? When do beans of each scope type get instantiated?

Web Services

  • What is the difference between SOAP-based web services and REST-based web services?

  • Describe SOAP and WSDL.

  • What exactly is REST? What is HATEOAS? What is the purpose of each of the HTTP verbs? What is idempotence? What is content-negotiation?

OOP

  • What is decoupling? Why are loose-coupling coupled classes desirable? What are some drawbacks?

  • What is cohesion? Why are highly cohesive classes desirable? What are some drawbacks?

  • Describe polymorphism. What is the importance of contracts between interfaces and concrete types? Why is polymorphic code desirable? What are some drawbacks?

🌐
Quora
quora.com › What-are-the-interview-questions-for-Java-for-12-years-experience
What are the interview questions for Java for 12 years experience? - Quora
Answer (1 of 2): If you are looking for a role in a product company, following things should be known before you give interview at 12 years experience - 1. Data Structures - Basic knowledge, not in detail. Do not invest high percentage of your time in data structures as at your experience you wo...
Discussions

Java interview questions
Impress them by revealing that Java is short for JavaScript! More on reddit.com
🌐 r/ExperiencedDevs
74
72
November 21, 2025
115 Java Interview Questions and Answers – The ULTIMATE List
These aren't interview questions, these are trivia questions. If you find yourself in an interview where they are asking you questions like this, run away. Run far away. More on reddit.com
🌐 r/java
15
151
May 22, 2014
140 Java Interview Questions Answers for 2 to 5 Years Experienced Programmers
Dude I'd love to read through it but the grammatical mistakes make me feel that I have a brain aneurysm while reading More on reddit.com
🌐 r/SpringBoot
22
28
July 18, 2024
100 most asked Java Interview Questions and Answers
Java is a high-level programming language which provides OOP (Object Oriented Programming). Java is easy to write, compile, debug, and learn. Object Oriented Programming (OOP) allows us to create modular programs and reusable code. The code written in Java is platform independent, i.e., a code written in any machine can be used in a different machine for the same purpose. Sun Microsystems developed Java. Java is widely used for creating applications, games, and websites. Here we are going to discuss the most asked Java interview questions. 1. What are the features of Java programming language? Answer: Java has the following features: - Java provides Object-Oriented Programming. - Java provides inheritance. - Java provides polymorphism. - Java provides encapsulation. - Java provides abstraction. - Java is platform-independent. 2. What is a class in Java? Answer: A class can be considered a group of objects that has common properties. A class is like an object constructor or a blueprint for creating objects. A class in Java can contain methods, fields, constructors, blocks, and nested classes. 3. What is inheritance? Answer: Inheritance means a sub-class inherits the properties of the class from which it is derived, or in other words, inheritance means one class can extend another class. The derived class is known as a sub-class, whereas the existing class is known as the superclass. Inheritance is only applicable in the case of public and protected members of a class. Private members cannot be inherited. 4. What is polymorphism? Answer: Polymorphism is the capability of a message to be displayed in multiple forms. Polymorphism allows us to perform a single task in various alternatives. The word poly means many, while morph means numerous. Thus the word polymorphism translates to multiple forms. 5. What is meant by encapsulation? Answer: Encapsulation is the process of wrapping up data together into a single unit. Encapsulation provides control over the data, and helps to achieve data hiding. 6. What are the different access modifiers in Java? Answer: The access specifiers are used to define the restriction on the access of the class and members of a class. Java provides four access modifiers which are listed below: - Private - Public - Protected - Default 7. Why is Java not considered as completely object-orientedd? Answer: Java is not considered wholly object-oriented because Java uses eight primitive data types (boolean, byte, char, int, float, double, long, short), which are not objects. 8. What is a wrapper class in Java? Answer: We can convert the Java primitives into objects using a wrapper class. 9. What are constructors in Java? Answer: Constructor refers to a code block using which we can initialize an object. Constructors also have the same name as the class. Constructors are called automatically during the creation of the class. Constructors have no return type. 10. Why are pointers not used in Java? Answer: Java does not provide pointers because they increase the program's complexity and are unsafe. Java is a simple programming language, so adding it would contradict the fact. 11. What is Object Oriented Programming (OOP)? Answer: Object Oriented Programming (OOP) is a method of programming that organizes the software design around data or objects rather than functions and logic. Object Oriented Programming (OOP) is one of the most popular programming models. It suits well for complex and large problems. More on reddit.com
🌐 r/programming
13
3
September 30, 2022
People also ask

Are Java 8 features frequently asked in 2-3 years experience Java interviews?
Yes, Java 8 features like Streams API, Lambda Expressions, Functional Interfaces, and Optional classes are popular topics. Interviewers often expect you to explain how you used these in projects.
🌐
founditgulf.com
founditgulf.com › home › career advice › interview questions​ › java interview questions and answers for 2 to 3 years experienced: top 50
50+ Java Interview Questions and Answers for 2-3 Years Experienced
What Java topics should I focus on for 2-3 years experience interview?
For 2–3 years Java experienced roles, focus on OOPS concepts, collections framework, exception handling, multi-threading, Java 8 features like streams and lambda expressions, and basic JDBC. Real-time application scenarios and design patterns are also important.
🌐
founditgulf.com
founditgulf.com › home › career advice › interview questions​ › java interview questions and answers for 2 to 3 years experienced: top 50
50+ Java Interview Questions and Answers for 2-3 Years Experienced
What types of questions are asked in Java senior developer interviews?
Interviewers often ask scenario-based and design-level questions such as:
How do you prevent memory leaks in Java?
Explain concurrency handling in your last project.
How would you implement a thread-safe cache?
What are the trade-offs between using Streams and traditional for-loops?
What GC strategies have you used in production?
🌐
javainterviewquestionspro.com
javainterviewquestionspro.com › home › java advanced › top core java interview questions for 10 years experience (with expert answers)
Top Core Java Interview Questions for 10 Years Experience (with ...
🌐
HackerRank
hackerrank.com › blog › java-interview-questions-you-should-know
10 Java Interview Questions You Should Know - HackerRank Blog
June 27, 2023 - Below are five examples of more challenging java interview problems, with difficulties ranging from medium to advanced. These questions cover more specific concepts and language-specific knowledge, and are also meant to be solved in a collaborative IDE.
🌐
GeeksforGeeks
geeksforgeeks.org › java › java-interview-questions
200+ Core Java Interview Questions and Answers (2025) - GeeksforGeeks
December 10, 2025 - Java is the most used language in top companies such as Uber, Airbnb, Google, Netflix, Instagram, Spotify, Amazon, and many more because of its features and performance. In this article, we will provide 200+ Core Java Interview Questions tailored for both freshers and experienced professionals.
🌐
Codekatha
codekatha.com › 2023 › 04 › Java-interview-questions-for-10-years-experience.html
Java Interview Questions for 10 Years Experience
May 30, 2024 - This blog post will provide you with a list of commonly asked interview questions for 10 years experienced Java developers. It will also include detailed answers to each question, with explanations and examples to help you understand the concepts and their practical implementations better.
🌐
Javainterviewquestionspro
javainterviewquestionspro.com › home › java advanced › top core java interview questions for 10 years experience (with expert answers)
Top Core Java Interview Questions for 10 Years Experience (with Expert Answers)
July 13, 2025 - For a Java professional with 10+ ... Interviewers often ask scenario-based and design-level questions such as: How do you prevent memory leaks in Java?...
Find elsewhere
🌐
InterviewBit
interviewbit.com › java-interview-questions
150+ Core Java Interview Questions and Answers | Freshers & experienced
Crack Core Java interviews with 150+ questions and answers for freshers and experienced developers OOP, collections, multithreading, JVM, exceptions, and more.
Published   January 25, 2026
🌐
DataCamp
datacamp.com › blog › java-interview-questions
Top Java Interview Questions & Answers For All Levels 2026 | DataCamp
1 month ago - A list of 61 Java interview questions suitable for developers applying to junior, intermediate, and senior roles.
🌐
Foundit Gulf
founditgulf.com › home › career advice › interview questions​ › java interview questions and answers for 2 to 3 years experienced: top 50
50+ Java Interview Questions and Answers for 2-3 Years Experienced
July 1, 2025 - Get 50+ top Java interview questions for 2-3 years experience. Covers Java 8, OOPS, collections, multithreading, design patterns, and coding scenarios.
🌐
Indeed Career Guide
sg.indeed.com › career guide › interviewing › advanced java interview questions: 10-year experienced candidates
Advanced Java Interview Questions: 10-Year Experienced Candidates | Indeed.com Singapore
September 29, 2025 - Discover general, background-related and in-depth Java interview questions for candidates with 10 years of experience and explore sample answers to help with your preparation.
🌐
Verve AI
vervecopilot.com › interview-questions › top-30-most-common-interview-questions-for-10-years-experience-in-java-you-should-prepare-for
Top 30 Most Common Interview Questions For 10 Years Experience In Java You Should Prepare For
June 24, 2025 - This guide collects the top 30 questions hiring panels ask candidates with a decade of Java experience, organized by theme and paired with concise, interview-ready answers and examples to sharpen your delivery. Use these to structure study sessions, mock interviews, and story-driven STAR responses for behavioral rounds. Relevant industry resources include Indeed’s senior Java advice and technical references like GeeksforGeeks.
🌐
Java Guides
javaguides.net › 2023 › 07 › java-coding-interview-questions-and-answers.html
Java Coding Interview Questions and Answers for 2-5 Years Experience
July 27, 2023 - In this blog post, we will discuss frequently asked Java coding interview questions along with complete programs and their outputs.
🌐
Reddit
reddit.com › r/experienceddevs › java interview questions
r/ExperiencedDevs on Reddit: Java interview questions
November 21, 2025 -

Someone on linkedin posted the following questions he saw on an interview:

  1. What are virtual threads in Java 21 and how do they differ from traditional threads?

  2. How does record improve DTO handling in Java?

  3. Explain the difference between Optional.get(), orElse(), and orElseThrow().

  4. How does ConcurrentHashMap achieve thread safety internally?

  5. What are switch expressions and how are they different from switch statements?

  6. Explain the Fork/Join framework and its advantages.

  7. How does pattern matching for instanceof simplify Java code?

  8. How do you implement immutability in Java classes?

  9. What are the benefits of using streams and functional programming in Java?

  10. How does Java handle memory management for unreachable objects?

I've been a developer for over 10 years, mostly backend java, and I can only answer 7, 8, and 10. Am I right in thinking that these types of questions don't accurately gauge a developer's ability, or am I just a mediocre developer? Should I bother learning the answers to these questions (and researching other java interview questions)? On the one hand I don't think it would make me a better developer, but maybe this is what it takes to pass interviews? In previous interviews (I haven't interviewed since pre-covid) the technical part of an interview would just involve solving some problem on the white board.

🌐
Medium
medium.com › @vivekkadiyanits › java-lead-7-to-10-years-interview-mastery-covered-question-has-asked-in-more-than-9-service-base-d55ffbb0009c
Top 50 Java Interview Questions for 10 Years | Medium
March 26, 2024 - Question 9 : Write a program to find second highest element from an array , Array can contain duplicate elements . Solve it by stream java 8. Question 10 : Write a program to find first repeat element/character from a given string by Java Streams.
🌐
Braintrust
usebraintrust.com › hire › interview-questions › java-developers
Java Developer Interview Questions
June 23, 2024 - What's the difference between '=='' and 'equals()' in Java? Answer: '==' checks for reference equality (whether they refer to the same object), while 'equals()' checks for content equality based on overridden implementation.
🌐
Blogger
javarevisited.blogspot.com › 2015 › 10 › 133-java-interview-questions-answers-from-last-5-years.html
Top 133 Java Interview Questions Answers for 2 to 5 Years Experienced Programmers
It contains interview questions not only from classic topics like threads, collections, equals and hashcode, sockets but also from NIO, array, string, Java 8, and much more. It has questions for both entry-level Java programmers and senior developers with years of experience. No matter whether you are a Java developer of 1, 2, 3, 4, 5, 6, 8, 9, or even 10 ...
🌐
Workable
resources.workable.com › home › senior java developer interview questions and answers
Senior Java Developer interview questions and answers
October 3, 2024 - This question assesses the candidate’s knowledge of Java’s capabilities for scripting languages. “The Java Scripting API allows you to integrate scripting languages like JavaScript into Java applications. A use case could be server-side data validation.” · A strong Senior Java Developer candidate will have an in-depth understanding of Java and its ecosystem, excellent problem-solving skills, and experience with best practices like testing and continuous delivery.
🌐
LeetCode
leetcode.com › explore › interview › card › top-interview-questions-easy
LeetCode's Interview Questions Easy Collection.
LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore.
🌐
ScholarHat
scholarhat.com › home
70+ Java Interview Questions for All Levels (Beginner to Expert)
September 9, 2025 - The Java Interview Questions for 10 Years Experience article covers 80 advanced questions to help you master core Java, multithreading, design patterns, JVM internals, performance tuning, and best practices.