"Hi, buddy. I made a copy of your contract for you, just in case. Rishi, that cheapskate, is blissfully ignorant. You should see the figures in my contract. Ha!"
"Good job, Diego. I think I'll learn a lot from you."
"Sure thing, Amigo. There are too many stupid people in the world who want to get rich without actually doing something. But there are even more idiots who are ready to work for free."
"OK, let's get back to our lesson. Now I'm going to teach you several ways to create variables:"
Example | Explanation |
---|---|
|
Create two identical empty strings. |
|
Create an int variable; |
|
Create an int , variable named a and set its value equal to 5 |
|
Create an int , variable named a and set its value equal to 5 Create an int , variable named b and set its value equal to 6 |
|
Create an int variable named a and set its value equal to 5 Create an int variable named b and set its value equal to 6 |
|
Create a Date object. It is initialized to the current date and time. |
|
Initialize a boolean variable to true |
|
Assign false to the isLess variable. Boolean variables only accept the values true and false. |
"Cool, Diego! You always make everything so clear."
"LOL! Thanks, Amigo."
"By the way, I have a couple more exercises for you. How are they going so far?"
"They weren't too hard, and some were pretty funny."
GO TO FULL VERSION