Chapter 6

Using the Building Blocks: Variables, Values, and Types

IN THIS CHAPTER

check Declaring variables

check Assigning values to variables

check Working with numbers

check Using Java types

Back in 1946, John von Neumann wrote a groundbreaking paper about the newly emerging technology of computers and computing. Among other things, he established one fundamental fact: For all their complexity, the main business of computers is to move data from one place to another. Take a number — the balance in a person’s bank account. Move this number from the computer’s memory to the computer’s processing unit. Add a few dollars to the balance and then move it back to the computer’s memory. The movement of data … that’s all there is; there ain’t no more.

Good enough! This chapter shows you how to move your data around.

Using Variables

Here’s an excerpt from a software company’s website:

SnitSoft recognizes its obligation to the information technology community. For that reason, SnitSoft is making its most popular applications available for a nominal charge. For just $5.95 plus shipping and handling, you receive ...

Get Beginning Programming with Java For Dummies, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.