Skip to content

Latest commit

 

History

History
38 lines (36 loc) · 2.51 KB

RephrasedInterviewQuestions.md

File metadata and controls

38 lines (36 loc) · 2.51 KB

Rephrased Interview Questions

This document contains rephrased, concise versions of common Java and database interview questions.

  1. How does the Java ClassLoader work?
  2. Compare ArrayList, LinkedList, TreeSet, HashMap, and ConcurrentHashMap.
  3. Explain Try-with-resources and Java Streams (Intermediate vs Terminal operations, flatMap, reduce vs collect).
  4. What happens if a class implements two interfaces with identical method signatures?
  5. Explain ACID properties, SOLID principles, Pessimistic vs Optimistic locking, and Eager vs Lazy loading.
  6. What are the different types of relationships between entities?
  7. What is a Native Query?
  8. Explain the @Transactional annotation and isolation levels in transactions.
  9. What is the JPA/Hibernate Entity Life Cycle?
  10. JUnit: Difference between @Mock, @InjectMocks, and @Spy. What is @ParameterizedTest? How to achieve 100% code coverage?
  11. Differentiate between Static Binding and Dynamic Binding.
  12. Explain "IS-A" vs "HAS-A" relationships.
  13. What happens if one thread modifies a list while another thread is iterating over it?
  14. Explain AtomicInteger and why a++ is not thread-safe. How does it achieve non-blocking thread safety?
  15. Difference between Join and Subquery. WHERE vs HAVING clause. How to optimize a slow query?
  16. What is Database Indexing?
  17. How to create an Immutable class? Why is String immutable in Java?
  18. How to implement a Thread-safe Singleton class?
  19. How does HashMap handle collisions, and how can they be avoided?
  20. Why is only one null value allowed in a Set?
  21. Compare HashSet, LinkedHashSet, and TreeSet.
  22. How does ArrayList resize itself internally?
  23. What is the time complexity of adding an element in the middle of an ArrayList vs a LinkedList?
  24. In inheritance, if a child method throws FileNotFoundException, what exceptions can the parent method throw?
  25. Difference between Method Overriding and Method Hiding (static methods).
  26. How does Java manage memory (JVM Heap vs Stack)?
  27. What is Cascading in JPA/Hibernate?
  28. Provide an example of CascadeType.REMOVE.
  29. Which AI tools (Copilot, Cursor, Claude) do you use for development?
  30. Compare ExecutorService, CompletableFuture, and Virtual Threads.
  31. Explain the internal working of ConcurrentHashMap.
  32. What are the built-in Functional Interfaces in Java 8?
  33. How to find all palindromes in a list of strings using Java 8 Streams?
  34. How to find the word with the second largest length in a sentence using Java 8?