Title: Use IO.println in modern code slugs by Copilot · Pull Request #109 · javaevolved/javaevolved.github.io · GitHub
Open Graph Title: Use IO.println in modern code slugs by Copilot · Pull Request #109 · javaevolved/javaevolved.github.io
X Title: Use IO.println in modern code slugs by Copilot · Pull Request #109 · javaevolved/javaevolved.github.io
Description: Modern code examples were still using System.out.println — replaced with IO.println / IO::println across all affected slugs, keeping oldCode blocks unchanged.
Changes
10 YAML content files updated — only the modernCode field in each:
language/pattern-matching-instanceof, record-patterns, private-interface-methods, default-interface-methods
collections/reverse-list-iteration
concurrency/virtual-threads, process-api, completablefuture-chaining
streams/stream-iterate-predicate
strings/string-lines
Example
modernCode: |-
if (obj instanceof Point(int x, int y)) {
- System.out.println(x + y);
+ IO.println(x + y);
}
Method references updated consistently:
-).forEach(System.out::println);
+).forEach(IO::println);
Files already using IO.println (compact-source-files, io-class-console-io) were left untouched.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
sh.jbang.dev
Triggering command: /usr/bin/curl curl -Ls REDACTED (dns block)
If you need me to access, download, or install something from one of these locations, you can either:
Configure Actions setup steps to set up my environment, which run before the firewall is enabled
Add the appropriate URLs or hosts to the custom allowlist in this repository's Copilot coding agent settings (admins only)
Original prompt
This section details on the original issue you should resolve
Open Graph Description: Modern code examples were still using System.out.println — replaced with IO.println / IO::println across all affected slugs, keeping oldCode blocks unchanged. Changes 10 YAML content files updated...
X Description: Modern code examples were still using System.out.println — replaced with IO.println / IO::println across all affected slugs, keeping oldCode blocks unchanged. Changes 10 YAML content files updated...
Opengraph URL: https://github.com/javaevolved/javaevolved.github.io/pull/109
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0baa360f-8708-70df-c12a-af945bf205f8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BF22:2B1453:68DB59:8D7C64:6A618263 |
| html-safe-nonce | 1d6d5bc6b4f9560d389ee29a198c70c37c36c1dc0133e253b19af0cd3c354944 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjIyOjJCMTQ1Mzo2OERCNTk6OEQ3QzY0OjZBNjE4MjYzIiwidmlzaXRvcl9pZCI6IjQ4NzA0NDYxNzMzMTk2OTI4OTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 29d16d5e564daae7694d3592f1e284a948106bcbaec325fd6d3b03574156344e |
| hovercard-subject-tag | pull_request:3335943551 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/javaevolved/javaevolved.github.io/pull/109/files |
| twitter:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| og:image:alt | Modern code examples were still using System.out.println — replaced with IO.println / IO::println across all affected slugs, keeping oldCode blocks unchanged. Changes 10 YAML content files updated... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c28c2f6607f2aacbd934868d997038895c9780d08babfe918550d73773326f4c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/javaevolved/javaevolved.github.io git https://github.com/javaevolved/javaevolved.github.io.git |
| octolytics-dimension-user_id | 261976795 |
| octolytics-dimension-user_login | javaevolved |
| octolytics-dimension-repository_id | 1159421298 |
| octolytics-dimension-repository_nwo | javaevolved/javaevolved.github.io |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1159421298 |
| octolytics-dimension-repository_network_root_nwo | javaevolved/javaevolved.github.io |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cd05235d52ffb3318513d883a56c87a121015c8b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width