Loops
Conditionals
Basic Syntax
Syntax CONT.
Methods/Objects
100
A type of loop that executes a command infinitely until a certain requirement is met.
What is a while loop.
100
The statement that allows a block of code to run only under certain conditions.
What is an if statement.
100
The first time you create a variable.
What is initialization.
100
the datatype that saves numbers.
What is int
100
The most important method.
What is the main method.
200
A type of loop that executes a command a set number of times.
What is a for loop.
200
The argument of a conditional that dictates if the code runs or not.
What is a boolean.
200
The way you start a comment line.
What is // or /****/
200
the datatype that saves letters.
What is char.
200
The method that is inside an object that does not have a main method. This helps to create the object and set it's instance variables.
What is the constructor
300
The argument that dictates whether the loop should stop or not.
What is a boolean conditional.
300
The two states a boolean can be in.
What is true or false.
300
The case the first letter of a variable should be.
What is lower.
300
when saving a single letter to a variable, it must be surrounded by this.
What is '' single quotations
300
public static______ method() { int x =10; char y="T" Return x; } (fill in the blank)
What is int
400
The times this loop will run: int i=0; while(i>10) { i=i+1; }
What is a 0.
400
The output to the console: if(true) { System.out.println("true"); } if(false) { System.out.println("false"); }
What is just "true".
400
the indication of the end of a line of code.
What is a ";"
400
To print an output to the console, this must be typed. (case sensitive)
What is System.out.println([content])
400
What is sent along with a method call. (i.e. what is the stuff inside the parenthesis called)
What is an argument.
500
The scope of a variable initialized inside a loop.
What is the Loop itself.
500
The output to the console: public class Test { public static void main(String args[]){ int x = 30; if( x == 10 ){ System.out.print("Value of X is 10"); } if( x == 20 ){ System.out.print("Value of X is 20"); } x=x-10; if( x == 30 ){ System.out.print("Value of X is 30"); } } }
What is nothing.
500
The first line that dictates the beginning of the program.
What is public class [name]
500
The type of object in which text is saved.
What is String.
500
the code for the following method call which adds one to any number: ... int y=10; int x=addOne(y); ... WORTH DOUBLE POINTS!!!
What is public static int addOne(int y) { y=y+1; return y; }
M
e
n
u