Mr. David
Variables
Arrays
For Loops
Miscellaneous
100
The city closest to where I'm from.
What is Boston?
100
Java data type that can be represented 2 different ways
What is an char?
100
The category of data type that arrays belong to (for example, Pong was a custom class and int's are primitives)
What is a collection?
100
What kind of data type a 'for each loop' iterates over.
What is a collection?
100
A general-purpose computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible
What is Java?
200
The number of siblings I have.
What is 3?
200
The statement in method declaration that determines what kind of output a method should give.
What is the return type?
200
The index of the last element of an array.
What is length-1?
200
A correct for loop: a. for (int i = 0, i < 5, i++) b. for (int i = 0; i != -1; i = str.indexOf("hi")) c. for (char c : "hello") d. for (int i = 1; i*=2; i < 8)
What b?
200
A program that translates Java Source code (what we write) into Java Byte code (what the computer can read and compute).
What is the Compiler?
300
The names of 5 NFL teams.
What are ......?
300
A Java term that is used to indicate that a variable does not currently refer to any object.
What is null?
300
The biggest possible integer value, some of you have used it in finding minimum values.
What is Integer.MAX_VALUE?
300
The correct output of this code: int sum = 0; for (int i = 1; i < 4; i ++) for (int j = i; j < 4; j++) sum += j; return sum;
What is 14?
300
An instance of a class, the foundation of Java.
What is an Object?
400
The language that I wrote my college thesis (primarily) in.
What is MatLab?
400
The incorrect initialization below: a. int[][] arr1 = new int[5][4]; b. char x = 8; c. int [][] arr2 = {1,2,3},{4,5,6},{7,8,9}; d. int y = 'y'; e. String str = "";
What is c?
400
The output of this code: int[] arr = {4,1,4,2,3}; int sum = 0; for (int i : arr) sum += i*arr[i]; return sum;
What is 39?
400
The correct output of this code: int num = 0; for (int i = 0; i < 20; i ++) { num += i; i *= 2; } return num;
What is 26?
400
The cause of the worst breach of American military computers in history: a. an officer picked up an infected USB drive in a parking lot and plugged it into his computer to find out what was on it b. a teenager competing in a hacking competition revealed thousands of passwords c. a high ranking official used the same password for his World of Warcraft account as his Pentagon login d. Trump posted pictures of his security information on Twitter
What is a?
500
The location at which I'm racing over break.
What is The Armory (in NYC)?
500
All primitive data types in Java.
What is boolean, int, long, short, float, double, char, byte?
500
The problem with the following code, which is supposed to copy arr1 into arr2: int[][] arr1 = {{1,2,3},{4,5,6}}; int[][] arr2 = new int[arr1.length][]; for (int i = 0; i < arr1.length; i++) for (int j = 0; j < arr1[i].length; j++) arr2[i][j] = arr1[i][j];
What is the rows of arr2 have not been initialized?
500
The correct output: int i = 3, num = 0; for (boolean b = true; num < 10; b = !b) { if (b) i *= 2; else i -= 1; num++; } return i;
What is 65?
500
The five most used coding languages worldwide.
What are Java, Python, C, Ruby, and JavaScript (C# is a close 6th)?
M
e
n
u