O'Reilly logo

Beginning Programming with Java For Dummies, 5th Edition by Barry A. Burd

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8

Numbers? Who Needs Numbers?

IN THIS CHAPTER

check Working with characters

check Dealing with “true” or “false” values

check 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, 5th Edition.” A fax with this message sends a picture of the four letters t-r-u-e, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required