Core Java Interview Questions for 2-5 Experienced Developers

In this article, we will discuss the frequently asked Core Java interview questions.

As probably you know that Core Java is base for any other Java-related technologies and frameworks. Every interviewer look for a candidate who has strong Core Java skillset.

In this article, I would like to share my experience with interviews from a small organization to MNC companies.

Check out my top articles related to Core Java interview preparation:
  1. Top 10 Java main() Method Questions
  2. 25+ OOPS Interview Questions
  3. 25+ Java 8 Interview Questions
  4. 25+ Java String Interview Questions
  5. 25+ Java Exception Handling Questions
Here I will list out frequently asked Core Java interview questions that have been asked for me as well as my friends.
  1. How HashMap works internally? [Solution]
  2. What is the difference between Comparable and Comparator interface? [Solution]
  3. What are oops principles? [Solution]
  4. What are SOLID Principles?[Solution]
  5. How to make the class as immutable?[Solution]
  6. What is Serialization?[Solution]
  7. What is Synchronization?[Solution]
  8. What is fail-safe vs fail-fast Iterator in Java?[Solution]
  9. What are Java 8 Features?[Solution]
  10. What is the use of Lambda Expression?[Solution]
  11. What is the use of Stream?[Solution]
  12. What is the difference between Interface and Abstract class?[Solution]
  13. What is a.hashCode() used for? How is it related to a.equals(b)?[Solution]
  14. Why you need to override hashcode when you override equals in Java?[Solution]
  15. What is the contract between equals and hashcode method?[Solution]
  16. Difference between ArrayList and LinkedList in Java?[Solution]
  17. What is the difference between Hashtable and HashMap?[Solution]
  18. Can two equal object have the different hash code?[Solution]
  19. What is the use of Serialize ID?[Solution]
  20. What is the difference between String, StringBuilder, and StringBuffer?[Solution]
  21. How to make a checked exception?[Solution]
  22. How to make an unchecked exception?[Solution]
  23. How to create custom exceptions?[Solution]
  24. What is ConcurrentHashMap?[Solution]
  25. What is the difference between Hashtable and ConcurrentHashMap?[Solution]
  26. Can we override a static method? if no then why?[Solution]
  27. What is fail fast and fail-safe in java?[Solution]
  28. Why String is immutable in java?[Solution]
  29. Why multiple inheritances are not supported in Java?[Solution]
  30. How to detect deadlock and fix it?[Solution]
  31. What is singleton and write code for singleton pattern?[Solution]
  32. Difference between noclassdeffounderror and classnotfoundexception?[Solution]
  33. Explain race condition in Java hashmap?[Solution]
  34. Can we call a static method with a null object?[Solution]
  35. How does volatile variable works in Java?[Solution]
  36. What is a thread local variable in Java?[Solution]
  37. Write code for thread-safe Singleton in Java?[Solution]
  38. The difference between sleep and wait in Java?[Solution]
  39. What is an immutable object? How do you create an Immutable object in Java?[Solution]