These two activities do not ask you to repeat a list of APIs. They ask you to show how to move from a problem to a verifiable choice and how to keep learning when the book can no longer accompany every step. It is useful to retain your answers and reread them after working on a real project: the criterion is not guessing the book's “right” answer, but making context, evidence and limits explicit.
C22.1 – From the first diagnosis to a new problem
Return to the self-diagnosis made at the beginning of the volume, or now describe a problem you would then have solved by copying an example. It may be a growing archive, a slow HTTP request, a concurrent reservation or a program difficult to distribute. Write in prose which observable behavior you want and which failure you fear. Identify one brick from the book that helps, one that would be out of place here and a minimal experiment that could disprove your choice. Finally, change one constraint, for example the source from file to network or usage from one thread to many, and explain what you must redesign.
Success criterion. The answer distinguishes the problem from the first API that came to mind; describes at least one invariant or measurable limit, a positive and a negative test; and recognizes a condition where the initial solution stops being enough. Readers receive no points for the number of technologies named.
Hint. In the C29 catalog, the build answers “can a colleague reconstruct and launch the program?”. In C30, the parser answers another question: “which inputs and costs do we accept?”. A green build does not answer the second.
Reasoned solution, an example. I want to import titles from a user-uploaded file and make them visible only when they are all valid. The eighty-unit line limit and hundred-title limit reduce two costs; a file with millions of blank lines shows that an overall limit is missing. I test one hundred valid titles, the one hundred and first, and many blank lines; then verify that failure does not replace the previous catalog. AtomicInteger does not solve complete publication of several records: a transaction or version replacement is needed. If the source becomes HTTP, I add timeouts, a response maximum and handling of network interruption. The choice is transferable because every new measure answers a declared risk.
C22.2 – Reading about a JDK feature without confusing project and release
Choose a feature mentioned in the Conclusions, such as virtual threads, the Foreign Function and Memory API or a Valhalla proposal. Start from the project page or a news item, then reach the JEP and official documentation for the release you are using. Record consultation date, status in your release, any compilation and execution options, and the problem the feature intends to tackle. Write a few-line experiment or compilation test distinguishing “available” from “announced”. Conclude by saying whether you would use it in your project and which information you still lack.
Success criterion. The answer cites primary sources with the exact release; distinguishes stable, preview and incubator; separates project motivation from the available API contract. The adoption decision contains a concrete case and a limit, rather than mere enthusiasm or distrust.
Hint. A project page may contain work for future versions. A JEP may be draft, candidate, targeted or delivered. For behavior in Java 25, check Java 25 documentation and compile with that JDK.
Reasoned solution, an example. JEP 444 records virtual threads as delivered in Java 21. In JDK 25, Thread.ofVirtual() is available without --enable-preview. The problem addressed is the cost of maintaining a dedicated platform thread for many operations waiting for I/O; it is not a promise to accelerate CPU-bound computation. A minimal program creates a virtual thread, starts it and waits for completion; a representative load test is needed before replacing a service's architecture. For a Valhalla proposal, the answer would differ: I check any experimental build, but do not treat the proposal as a stable Java 25 API.