|
ROGERS CADENHEAD
My Projects
Workbench
SportsFilter
Drudge Retort
Watching the Watchers
Wargames.Com
Buzzword.Com
RSS Spec
My Java Books
Teach Yourself Java 6 in 21 Days
Teach Yourself Programming with Java in 24 Hours, Fourth Edition
Teach Yourself Java 2 in 21 Days, Fourth Edition
Teach Yourself Java 2 in 21 Days Pro Reference Edition, Third Edition
Teach Yourself Java 2 in 24 Hours, Third Edition
My Weblogging Books
Movable Type 3 Bible Desktop Edition
Radio UserLand Kick Start
My Internet Books
Teach Yourself FrontPage 2003 in 24 Hours
|
Day 17: Handling Data Through Java Streams
NOTES AND CORRECTIONS
- On Page 439, the BufferedReader class is referred to twice as a
means of creating output streams. The correct class is BufferedWriter.
SOURCE FILES
READER QUESTIONS
- Q: The FileWriter class has a
write(int) method that's used to send a character to
a file. Shouldn't this be write(char)? --
B.B.
A: The char and int data types are
interchangeable in many ways -- you can use an int in a
method that expects a char, and vice versa. This is
possible because each character is represented by a numeric code
which is an integer value. When you call the write() method
with an int, it outputs the character associated with that
integer value. When calling the write() method, you can
cast an int value to a char to ensure that it's
being used as intended.
LINKS
|