Runnable sources, broken examples and captured transcripts for the ankurm.com JEP 512 article, including the measured launch order and a private-constructor difference between 25 and 27. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TF9JWFvJSNm6HVzswzZU5a
8 lines
261 B
Java
8 lines
261 B
Java
// The other fix: import the whole module (JEP 511, final in Java 25). One line covers java.net.http.
|
|
import module java.net.http;
|
|
|
|
void main() {
|
|
HttpClient client = HttpClient.newHttpClient();
|
|
IO.println("default HTTP version: " + client.version());
|
|
}
|