Methods 101
Loops and Loops and Loops
For Loops
Bracket Bonanza
Bug Destroyers
100

This is the abbreviation IntelliJ lets us use to write out the main method.

What is psvm?

100

This is what loops are useful for.

What is repetition of code?

100

This part of a for loop declares the local int for the counter.

What is "int i = 0;"?

100

This is what goes between brackets.

What is a block of code?

100

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?

200

String, int, boolean, boolean, and void are examples of this.

What is a return type?

200

We use this type of loop when we are checking for a condition.

What is a while loop?

200

This part of a for loop checks to make sure the condition is still true.

What is "i<maxValue;" or some variant thereof?

200

This is where a bracket goes in a conditional/if statement.

if (someCondition){

     //code

} else if (anotherCondition){

    //code

} else {

    //code

}

200

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?

300

This is what we put between the parentheses when we call a method.

What is a parameter or an argument?

300

We use this type of loop when we want to do something a set number of times.

What is a for loop?

300

This part of a for loop increments the counter.

What is "i++;"?

300

This is where brackets goes in a for loop.

for (int i = 0; i < 3; i++){

    //code

}

300

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?

400

This is a variable that can only be used in one method.

What is a local variable.

400

This is what would happen if you ran code that said this:

while(true){

    System.out.println("Hello world");

}

What is loop infinitely?

400

This is how many brackets a for loop needs.

What are two brackets?
400

This is where brackets go in a method.

public static void cupcakeMaker(){

    //code

}

400

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?

500
This is where you call a method that you want to use.
Where is the main method?
500

This is the word we use to describe a loop within a loop.

What is nesting?

500

This is a data structure that for loops are particularly useful for.

What is an array?

500

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?

500

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?

M
e
n
u