You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Example code using System.err instead of System.out #268
In Tutorials > The Java I/O API > File System Basics > Creating and Reading Directories, section "Listing a File System's Root Directories", the code prints to System.err instead of System.out when it is not printing an error.
Activity
authentictech commentedon Aug 4, 2026
On the same page, I've noticed that the wrong variable is used in the code in "Creating a Directory":
willy-b commentedon Aug 4, 2026
Good find! As a fellow volunteer reporting similar issues I am noting that the mismatched variable and System.err usage you report here dates back to at least 2025 (see https://web.archive.org/web/20250605060428/https://dev.java/learn/java-io/file-system/creating-reading-directories/ ) and is not from or related to the changes I recommended to this tutorial series recently in #210 (comment) which were made by the dev.java team. Thanks!
JosePaumard commentedon Aug 5, 2026
Thanks to both of you! You guys rock! A fix is on its way.