Path

A modern Java representation of a location in a filesystem.

What is Path in Java?

Path — A modern Java representation of a location in a filesystem.

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

class OrderFile {
    String read(Path path) throws IOException {
        return Files.readString(path);
    }
}

Level: Journeyman · More Java terms at this level

Updated

In other subjects