What is an algorithm?
The steps needed to solve a problem
What is the name of the male character in Minecraft?
Steve!
int myNum = 15;
myNum = 20;
System.out.println(myNum);
20
Is this a variable?
Int joker = 3;
int = 12;
Yes! Every variable needs a name!
What are variables?
a named container that holds data
Name a block that has a hardness of 50
Obsidian, crying obsidian, and netherite blocks are all expectable answers!
int x = 10;
int y = 20;
int z = x + y;
System.out.println(z);
30
What kind of data is held in variables?
Data Types!
int x = 234 - 23123;
No! No matter the size of the number, integer can take both positive and negatives
(T/F) Java is an Object Oriented Programming Language (OOP)
True!
What are baby sniffers called?
a snifflet!
int x = 10;
int y = 20;
x += y + x;
System.out.println(x);
String name = "John";
System.out.println(name + name);
it would print JohnJohn
Scanner myObj = new Scanner(System.in);
String userName = myObj.nextLine();
System.out.println("Username is: " + userName);
No! This is how we use scanners correctly!
What are scanners?
Receives user input
There is a 1 in 9 chance that this block spawns 4 blocks tall
Sugar Cane!
int x = 5;
int y = 20;
int z = x * y;
x = y * z;
System.out.println(y);
20
What do we add at the end of float variables?
f! The f lets the computer know we are using float variables
Do you need "public static void main(String[] args)" in every program?
Yes! Without this code in the beginning, our code would not work at all!
What is //
Makes comment in our code
What jungle mob does not spawn in peaceful mode ONLY in Java edition
Ocelots!
String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
System.out.println("The length of the txt string is: " + txt.length());
The length of the txt string is: 26
Why do we use floats instead of doubles?
Floats take less memory and we are not using large decimal numbers!
System.out.println("Hello World! It is time for us to eat dinner");
System.out.print("I am learning Java for the rest of the week.")
System.out.println("It is awesome! I am a huge fan of Minecraft, I cant wait till break time!");
yes! The second print statement is missing a semicolon (;)