Given this code segment:
Path aFilePath = Paths.get("D:\\dir\\file.txt"); Iterator<Path> paths = aFilePath.iterator(); while(paths.hasNext()) { System.out.print(paths.next() + " "); }
Choose the correct option assuming that you are using a Windows machine and the file D:\dir\file.txt does not exist in the underlying file system.
e)
the name elements in a path object are identified based on the separators.
to iterate name elements of the Path object does not actually require that the corresponding files/directories must exist, so it will not result in throwing any exceptions.