Input / Output Excercises



Match up the following.

_____ any information that is needed by your program
_____ any information that the program must convey to the user
_____ javabook2 is
_____ the standard java.io package classes are
_____ last i checked, the java.io package had this many classes and interfaces
_____ a class for reading input, whether from the console or from a file
_____ the declaration of a method of BufferedReader, used to read in one line at a time
_____ a class that hides the details of another class, providing an easier interface
_____ a set of public methods
_____ the declaration of a method of Integer, which converts a String to an int
_____ the declaration of a method of Double, which converts a String to a double
_____ a class for writing output, whether to the console or to a file
_____ the declaration of a method of PrintWriter, used to print one line
_____ an Exception declared to be thrown by the constructor of java.io.FileReader
_____ a class that splits a String into different tokens, defined to be separated by either whitespace or a specified delimeter
_____ the process of splitting a String into different tokens
_____ the declaration of a method of StringTokenizer that is used to get the next token
_____ the declaration of a method of StringTokenizer to determine if more tokens exist
_____ these are the classes and methods that I want you to know how to use
a) 65 classes, 10 interfaces
b) public boolean hasMoreTokens()
c) input
d) public static double parseDouble(String s) throws NumberFormatException
e) simple and easy
f) java.io.BufferedReader
g) output
h) java.util.StringTokenizer
i) public String nextToken() throws NoSuchElementException
j) public void println(String s)
k) tokenizing
l) FileNotFoundException
m) public String readLine() throws IOException
n) an interface
o) java.io.PrintWriter
p) a wrapper class
q) public static int parseInt(String s) throws NumberFormatException
r) flexible, complex, and powerful
s) File: exists()
BufferedReader: readLine(), ready(), reset()
PrintWriter: print(), println()
StringTokenizer: countTokens(), hasMoreTokens(), nextToken()
Double: parseDouble()
Integer: parseInt()