Variables with this data type can store positive or negative whole numbers.
What is int?
public void getReady(){
wakeUp();
takeShower();
getDressed();
eatBreakfast();
goToSchool();
}
When you getReady(), first you do this:
What is wakeUp?
>
This operator is called:
What is "greater than"?
x = 10;
x *= 2;
What is the new value of x?
What is 20?
This is the boolean value of:
1 > 3
What is "false"?
Variables of this data type can store decimal numbers.
What is double?
public void getReady(){
wakeUp();
takeShower();
getDressed();
eatBreakfast();
goToSchool();
}
When you getReady(), the last thing you do before you goToSchool() is this:
What is "eatBreakfast()"?
||
This operator is called:
What is "OR"?
x = 7;
x = x + 5;
What is the new value of x?
What is 12?
This is the boolean value of
"bob" = "bob"
What is "true"?
Variables of this data type can store only one of two possible values at any given time.
What is boolean?
Buko is a cat.
buko.meow();
Buko does this when this code runs:
What is "meow"?
==
This operator is called...
What is "equal to"?
x = 10;
x -= 5;
What is the new value of x?
What is 5?
You do this when this code runs and Jack says "jump":
if(jump.says("jump")){
jump();
}
What is "jump"?
Each one of these "big ideas in Java" can also be a data type.
What is an object?
or
What is a class?
Buko is a cat.
buko.color1 = "White";
buko.color2 = "Black";
buko.furPattern = "Tuxedo";
System.out.println(buko.furPattern);
If the code above runs, this gets printed:
What is "Tuxedo"?
This operator means...
What is "not equal to"?
x = 10;
y = 2;
x = x / y;
What is the new value of x?
What is 5?
You do this when this code runs and Jack does not say "jump":
if(!jack.says("jump")){
jump();
}
What is "jump"?
You do this when you convert one kind of data into another type of data.
What is casting?
System.out.println(yourName);
}
you.printName();
When the code above runs, this is printed out:
What is (well, it depends, right?)?
&&
This operator means...
What is "AND"?
x=10;
x++;
x--;
What is the final value of x?
What is 10?
if(thundering){
goInside();
}
else if(raining){
putOnRaincoat();
}
else{
keepPlaying();
}
What is "keep playing"?