Hi Everybody.
I'm trying to used these classes but i got an error about package.This is my sample
import java.nio.file.Paths; public class UsingPaths { public static void main(String args[]) { Path path = Paths.get("C:\\30-6-2009\\Demo\\Threads"); // Microsoft Windows syntax System.out.format("toString: %s%n", path.toString()); System.out.format("getName: %s%n", path.getName()); System.out.format("getName(0): %s%n", path.getName(0)); System.out.format("getNameCount: %d%n", path.getNameCount()); System.out.format("subpath(0,2): %d%n", path.subpath(0,2)); System.out.format("getParent: %s%n", path.getParent()); System.out.format("getRoot: %s%n", path.getRoot()); System.out.format("isHidden: %s%n", path.isHidden()); } }
This sample actually in
Path Operations (The Java™ Tutorials > Essential Classes > Basic I/O)
How can i fix this problem.