April 2022
Beginner
512 pages
11h 32m
English
Chapter 4
IN THIS CHAPTER
Assigning values to things
Making things store certain types of values
Applying operators to get new values
The following conversation between Mr. Van Doren and Mr. Barasch never took place:
Some aspects of this dialogue can be represented in Java by a few lines of code.
No matter how you acquire your million dollars, you can use a variable to tally your wealth. Listing 4-1 shows the code.
LISTING 4-1 Using a Variable
amountInAccount = 50.22;amountInAccount = amountInAccount + 1000000.00;