← Winnitude! Search  ·  Reader Mode (1981 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 6 LINKS

Example code using System.err instead of System.out · Issue #268 · java/devjava-content

Repository navigation

Example code using System.err instead of System.out  #268


New issue

New issue

Open

Open
Example code using System.err instead of System.out #268

Description

@authentictech's profile authentictech opened on Aug 4, 2026

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.

Iterable<Path> dirs = FileSystems.getDefault().getRootDirectories();
for (Path name: dirs) {
    System.err.println(name);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions