previous
|
start
|
next
Reading a Single Character from a File in Text Format
Use
read
method of
Reader
class to read a single character
returns the next character as an int
or the integer -1 at end of file
Reader reader = . . .; int next = reader.read(); char c; if (next != -1) c = (char) next;
previous
|
start
|
next