What is the difference between `String.chars()`, `String.codePoints()`, and how do they differ for supplementary characters? Java ProfessionalHard Try Now
What is the problem with double-checked locking for singletons before Java 5, and how did Java 5 fix it? Java ProfessionalHard Try Now
What is the difference between `WeakHashMap` and a regular `HashMap` with `WeakReference` values? Java ProfessionalHard Try Now
What is the output of the following code? “`java var list = List.of(3, 1, 4, 1, 5); list.stream() .distinct() .sorted() .limit(3) .forEach(System.out::print); “` Java ProfessionalHard Try Now
What is `Project Loom`’s virtual thread and how does it differ from a platform thread? Java ProfessionalHard Try Now
What is `ClassLoader` delegation model and what is the parent-first loading order? Java ProfessionalHard Try Now
What does the following generics code fail to compile? “`java List ints = new ArrayList(); List nums = ints; // Compile error? “` Java ProfessionalHard Try Now
What is the purpose of sealed interfaces combined with pattern matching in switch (Java 21)? Java ProfessionalHard Try Now
What is a `ForkJoinPool` and how does work-stealing improve throughput? Java ProfessionalHard Try Now
What is the happens-before guarantee provided by `synchronized` blocks? Java ProfessionalHard Try Now
What is the result of this code? “`java String s1 = new String(“hello”); String s2 = s1.intern(); String s3 = “hello”; System.out.println(s1 == s2); System.out.println(s2 == s3); “` Java ProfessionalHard Try Now
What is escape analysis in the JVM and what optimization does it enable? Java ProfessionalHard Try Now
What is the output of the following code? “`java int i = 0; while (i++ < 3) { if (i == 2) continue; System.out.print(i + " "); } “` Java ProfessionalHard Try Now
What is the difference between `ZGC` and `Shenandoah` garbage collectors? Java ProfessionalHard Try Now