Professional Documents
Culture Documents
Chapter 10: Using I/O: Copyfilechangespacetohyphen2.Java
Chapter 10: Using I/O: Copyfilechangespacetohyphen2.Java
Chapter 10: Using I/O: Copyfilechangespacetohyphen2.Java
1.
Because Javas I/O system is quite large, containing many classes, interfaces,
and method. Thus it is better to separate the two I/O Systems from each
2.
other.
Because using bytes streams System.in to read character from keyboard
3.
4.
5.
7.
CopyFileChangeSpaceToHyphen.java
8.
CopyFileChangeSpaceToHyphen2.java
9. System.in is bytes tream
10. It will return -1.
11. DataInputStream
12. Reader and Writer are at the top of the character stream.
13. The try-with-resources statement is used for automatic closing a file.
14.True.