This is the abbreviation IntelliJ lets us use to write out the main method.
What is psvm?
This is what loops are useful for.
What is repetition of code?
This part of a for loop declares the local int for the counter.
What is "int i = 0;"?
This is what goes between brackets.
What is a block of code?
public class TestClass{
public static void main(String[] args){
int number = 10;
System.out.println(foo());
}
public static int foo(int num){
int value = num + 5;
return value;
}
}
What is no parameter provided in the method call?
String, int, boolean, boolean, and void are examples of this.
What is a return type?
We use this type of loop when we are checking for a condition.
What is a while loop?
This part of a for loop checks to make sure the condition is still true.
What is "i<maxValue;" or some variant thereof?
This is where a bracket goes in a conditional/if statement.
if (someCondition){
//code
} else if (anotherCondition){
//code
} else {
//code
}
public class TestClass{
public static void main(String[] args){
int number = 10;
System.out.println(foo(number));
}
public static int foo(int num){
int value = num + 5;
}
}
What is no return statement?
This is what we put between the parentheses when we call a method.
What is a parameter or an argument?
We use this type of loop when we want to do something a set number of times.
What is a for loop?
This part of a for loop increments the counter.
What is "i++;"?
This is where brackets goes in a for loop.
for (int i = 0; i < 3; i++){
//code
}
public class TestClass{
public static void main(String[] args){
int number = 10;
System.out.println(foo(number));
public static int foo(int num){
int value = num + 5;
return value;
}
}
}
What is a method inside the main method?
This is a variable that can only be used in one method.
What is a local variable.
This is what would happen if you ran code that said this:
while(true){
System.out.println("Hello world");
}
What is loop infinitely?
This is how many brackets a for loop needs.
This is where brackets go in a method.
//code
}
public class TestClass{
public static void main(String[] args){
int number = 10;
System.out.println(foo());
}
}
public static int foo(int num){
int value = num + 5;
return value;
}
What is a method outside of the class body?
This is the word we use to describe a loop within a loop.
What is nesting?
This is a data structure that for loops are particularly useful for.
What is an array?
This is the name of the brackets that are the most important brackets that have ever existed in the whole word, which you will find in every class you write.
What are the class body brackets?
public class TestClass{
public static void main(String[] args){
int number = 10;
System.out.println(foo(number));
}
public static int foo(int num){
double value = num + 5;
return value;
}
}
What is the wrong type being returned?