Best Core Java Interview Questions – Techsarvam

OOPS Concepts & Design PrinciplesCore Java Interview Questions

  1. What are the four pillars of OOPS? Explain with real-world examples.
  2. What is the difference between abstract class and interface?
  3. What is encapsulation? How is it implemented in Java?
  4. What are design patterns you have used in your projects?

Collections Framework

  1. What is the difference between List, Set, and Map?
  2. What are the differences between HashMap and Hashtable?
  3. How does ConcurrentHashMap work internally?
  4. What is the difference between ArrayList and LinkedList?
  5. What is the fail-fast and fail-safe iterator in Java?

Exception Handling

  1. What is the difference between throw and throws?
  2. Checked vs Unchecked exceptions — examples and use cases.
  3. Can we override a method that throws an exception with one that doesn’t?

Multithreading & Concurrency

  1. How does synchronized work in Java?
  2. What is the difference between wait(), sleep(), and join()?
  3. What is the purpose of the volatile keyword?
  4. Difference between Runnable and Callable interfaces?

Java 8+ Features

  1. What are functional interfaces and lambda expressions?
  2. Explain Streams in Java 8 and use cases.
  3. What is the difference between map() and flatMap() in streams?

Leave a Comment

Your email address will not be published. Required fields are marked *