Self-Review Exercises

  1. 15.1 Determine whether each of the following statements is true or false. If false, explain why.

    1. You must explicitly create the stream objects System.in, System.out and System.err.

    2. When reading data from a file using class Scanner, if you wish to read data in the file multiple times, the file must be closed and reopened to read from the beginning of the file.

    3. Files static method exists receives a Path and determines whether it exists (either as a file or as a directory) on disk.

    4. XML files are not human readable in a text editor.

    5. An absolute path contains all the directories, starting with the root directory, that lead to a specific file or directory.

    6. Class Formatter contains method printf, which enables formatted ...

Get Java How to Program, Early Objects, 11th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.