Chapter 8
Numbers? Who Needs Numbers?
IN THIS CHAPTER
Working with characters
Dealing with “true” or “false” values
Rounding out your knowledge of Java’s primitive types
I don’t particularly like fax machines. They’re so inefficient. Send a short fax and what do you have? You have two slices of a tree — one at the sending end and another at the receiving end. You also have millions of dots — dots that scan tiny little lines across the printed page. The dots distinguish patches of light from patches of darkness. What a waste!
Compare a fax with an email message. Using email, I can send a 25-word contest entry with just 2,500 zeros and ones, and I don’t waste any paper. Best of all, an email message doesn’t describe light dots and dark dots. An email message contains codes for each of the letters — a short sequence of zeros and ones for the letter A, a different sequence of zeros and ones for the letter B, and so on. What could be simpler?
Now imagine sending a one-word fax. The word is true, which is understood to mean, “True, I accept your offer to write Beginning Programming with Java For Dummies, 6th Edition.” A fax with this message sends a picture of the four letters t-r-u-e, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access