Chapter 18Java I/O Fundamentals

THE OCP EXAM TOPICS COVERED IN THIS PRACTICE TEST INCLUDE THE FOLLOWING:

  • Java I/O Fundamentals
    • Read and write data from the console
    • Use BufferedReader, BufferedWriter, File, FileReader, FileWriter, FileInputStream, FileOutputStream, ObjectOutputStream, ObjectInputStream, and PrintWriter in the java.io package.
  1. Fill in the blanks: Writer is__________ that related stream classes__________ .

    1. a concrete class, extend
    2. an abstract class, extend
    3. an interface, extend
    4. an interface, implement
  2. Which of the following methods is defined in java.io.File?

    1. createDirectory()
    2. getLength()
    3. listFile()
    4. renameTo()

Get OCA / OCP Java SE 8 Programmer Practice Tests now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.