Imp. Interview Questions for Experienced Backend(Java) Developers

Neeru K Singh
3 min readFeb 16, 2023

--

  1. SOLID Design Principle and its Explanations?
  2. Explain about Transactional Annotations? How it works ? — click here
  3. How do you create a Custom Annotation?
  4. Design a thread safe Connection pool — click here
  5. Design custom Semaphore ? — click here
  6. Difference between Http.Put, Http.Patch, Http.Post?
  7. Implement Immutable class ?
  8. Design custom thread safe HashMap?
  9. Why default and static blocks in Interface from java 8 version onwards ?
  10. Design a Thread Safe cache that support both LFU and LRU; both should use same data structure. Type of eviction policy will be pass in constructor while creating of cache ?
  11. OutOfMememory vs Memory Leak ?
  12. Design your own garbage collector ?
  13. Difference between primary vs Unique, Void vs null?
  14. Why need interface if there is Abstract class?
  15. Sort a Hashmap based on values — click here
  16. Why Pointers are Eliminated in Java?
  17. Explain about Thread Life Cycle?
  18. What is meant by Externalisation in Java? — click here
  19. What is your idea about Reflection Api?
  20. What are the different types of Garbage Collection?
  21. What are the Java 8 Features?
  22. What is lambda in Java 8? — click here
  23. What is streams ?
  24. Java 8 vs 11 version?
  25. Do you have any idea about Thread Dump and how is it created?
  26. Difference between Volatile and Transient Keyword?
  27. What is Serialization? How Can we avoid Serialization of any fields or methods in a class?
  28. What is a serialVersionUID and why should I use it? — click here
  29. What is the use of Optional Class?
  30. What do you understand about Functional Interface and some functional Interfaces?
  31. What are the four main Functional Interface used in Java 8?
  32. What do you understand about Marker Interface and some example for Marker Interface?
  33. What is the difference between Fail-fast and Fail-Safe, Throw and Throws, StringBuffer and StringBuilder, Shallow copy and Deep copy, Finally vs final vs Finalize, String pool vs Heap?
  34. When creating a string with new keyword where the object of created?
  35. Try with Resources, Object class Methods, Default size of ArrayList etc.?
  36. What will happen if we try to remove any element from list without adding into it? eg List.remove(0) ?
  37. what will happen if we execute the following statement
    int a = Integer.parseInt(“text”);
  38. How can you make an immutable class in java?
  39. What is the transient keyword?
  40. Implement Builder design pattern
  41. JVM vs JRE vs JDK?
  42. How String Pool works?

Java Interview questions on OOP Concepts

  1. What is difference between loose coupling and tight coupling?
  2. What is difference between cohesion and coupling?
  3. What is Liskov Substitution principle? Can you explain with example?
  4. What is difference between abstract class and interface in Java?
  5. What is difference between composition, aggregation and association?

Java Interview questions on Collections

  1. Difference between List, Set and Map in Java?
  2. Difference between synchronized and concurrent collection in Java?
  3. How is HashMap implemented in Java? How get method of HashMap works in Java?
  4. Implement custom HashMap ? — click here
  5. How is priorityQueue implement in Java?
  6. Difference between Map and FlatMap?
  7. Idea about var args, Hashcode and Equals, Streams vs Collections?
  8. How ConcurrentHashMap is different than Hashtable? How it achieve thread-safety?
  9. When to use LinkedList over ArrayList in Java?
  10. What is the difference between Comparable and Comparator Interface?
  11. Difference between Collection and Collections?
  12. What is the advancement made in Hashmap in Java 8?

Java Interview questions on Concurrency

  1. How notify and notifyAll work, and the difference between them. Why prefer notifyAll to notify? Why these methods in Object class rather than thread class?
  2. What is the ideal Thread Pool Size ? — click here
  3. What is a race condition and how do you avoid it?
  4. What is a deadlock and how do you avoid it? Implement Deadlock ?
  5. What are some of the high-level concurrency classes provided by java.util.concurrent and how do they work?
  6. Can you implement single producer single consumer solution in Java?
  7. Can you implement single producer multiple consumers solution in Java?
  8. Countdown latch vs Cyclic barrier ?
  9. How we can create a thread safe Singleton design pattern ?
  10. Do you have any work experience in Executor Services? — click here
  11. Difference between Callable and Runnable and Future?
  12. What are the different types of Thread pool creation in Concurrency Control? — click here

Spring Framework Interview Questions for Experienced Java developers — click here

Interview questions on Database + Hibernate — click here

Interview questions on Web Services and Microservices — click here

Amazon SQS — click here

How Redis internally Works — click here

If you liked the article, please don’t forgot to clap and follow me for more such articles. Please let me know in the comments if you have any suggestion or solution.

Happy Reading !!!

--

--

No responses yet