1. What are virtual threads in Java 21 and how do they differ from traditional threads?

  2. How does record improve DTO handling in Java?

  3. Explain the difference between Optional.get(), orElse(), and orElseThrow().

  4. How does ConcurrentHashMap achieve thread safety internally?

  5. What are switch expressions and how are they different from switch statements?

  6. Explain the Fork/Join framework and its advantages.

  7. How does pattern matching for instanceof simplify Java code?

  8. How do you implement immutability in Java classes?

  9. What are the benefits of using streams and functional programming in Java?

  10. How does Java handle memory management for unreachable objects? https://www.reddit.com/r/ExperiencedDevs/comments/1p30o0i/java_interview_questions/