Java Interview Questions

Introduction

This interview questions are the main questions which picked by me.

Java

OOP

  1. What is the difference between abstract class and interface?
  2. What is the use-case difference between abstract class and interface?

Collections API

  1. What data structures you know in Collections API
  2. What is the differences between ArrayList and LinkedList
  3. Complexity of operations on ArrayList and LinkedList
  4. Difference Between Set and List
  5. How Hashmap works internally
  6. What is equals and hashcode for and what is their usage on Hashmap
  7. Complexity of Hashmap
  8. What is hash collision

Multi-Threading

  1. What is the difference between Thread and Runnable?
  2. What is volatile and synchronized keywords for?
  3. What is the difference between synchronized and Lock?
  4. What is race condition?
  5. What is deadlock, live-lock and thread starvation?