What does the following code produce? “`java List list = Arrays.asList(“a”, “b”, “c”); list.stream() .filter(s -> s.equals(“b”)) .findFirst() .ifPresent(System.out::println); “` Java ProfessionalHard Try Now
What is the ABA problem in compare-and-swap (CAS) operations and how does `AtomicStampedReference` solve it? Java ProfessionalHard Try Now
What is the consequence of violating the `Comparable.compareTo()` contract regarding consistency with `equals()`? Java ProfessionalHard Try Now
What is the difference between `PermGen` (Java 7) and `Metaspace` (Java 8+)? Java ProfessionalHard Try Now
What is `invokedynamic` bytecode instruction and how does it enable lambda expressions? Java ProfessionalHard Try Now
What is the output of the following code? “`java public class Test { static int x = 10; static { x = 20; } static { x = x + 5; } public static void main(String[] args) { System.out.println(x); } }“` Java ProfessionalHard Try Now
What is the difference between G1 GC’s young, survivor, and old regions and what triggers a mixed collection? Java ProfessionalHard Try Now
What is the JVM’s Just-In-Time (JIT) compiler and what optimization does tiered compilation provide? Java ProfessionalHard Try Now
What is the difference between `Executor`, `ExecutorService`, and `ScheduledExecutorService`? Java ProfessionalMedium Try Now
What does `Object.clone()` produce by default and what must be done to use it safely? Java ProfessionalMedium Try Now
What is `BlockingQueue` and how is it used in producer-consumer patterns? Java ProfessionalMedium Try Now
What is the significance of `Externalizable` vs `Serializable` in Java? Java ProfessionalMedium Try Now