Making the Most of Variables
▶ Assigning values to things
▶ Making things store certain types of values
▶ Applying operators to get new values
READ THE BELOW CONVERSATION
The following conversation between Mr. Van Doren and Mr. Barasch never
took place:
Charles: A sea squirt eats its brain, turning itself from an animal into a plant.
Jack: Is that your final answer, Charles?
Charles: Yes, it is.
Jack: How much money do you have in your account today, Charles?
Charles: I have fifty dollars and twenty-two cents in my checking account.
Jack: Well, you better call the IRS, because your sea squirt answer is
correct. You just won a million dollars to add to your checking account.
What do you think of that, Charles?
Charles: I owe it all to honesty, diligence, and hard work, Jack.
Some aspects of this dialogue can be represented in Java by a few lines of code.
and Their Values
▶ Making things store certain types of values
▶ Applying operators to get new values
READ THE BELOW CONVERSATION
The following conversation between Mr. Van Doren and Mr. Barasch never
took place:
Charles: A sea squirt eats its brain, turning itself from an animal into a plant.
Jack: Is that your final answer, Charles?
Charles: Yes, it is.
Jack: How much money do you have in your account today, Charles?
Charles: I have fifty dollars and twenty-two cents in my checking account.
Jack: Well, you better call the IRS, because your sea squirt answer is
correct. You just won a million dollars to add to your checking account.
What do you think of that, Charles?
Charles: I owe it all to honesty, diligence, and hard work, Jack.
Some aspects of this dialogue can be represented in Java by a few lines of code.