(Objects & Classes)
The code used to get the next integer input from the user.
What is a "scan.nextInt();"?
This logical operator is used to check if two values are not equal.
What is a "!="?
An ordered list of values.
What is an Array?
Random = Random(); // seed nanoTime
int valInt = 0;
double valDbl = 0.0;
Random rand = new Random(); // seed nanoTime
int valInt = 0;
double valDbl = 0.0;
This holds the address for an object.
What is a reference?
This truth table defines the operator
T T - T
T F - T
F T - T
F F - F
What is a "||" or "or"?
It is used to process an array in a decreasing or increasing order.
What is a loop?
while (int count=1; count <= 5; count++) // condition
{
System.out.println (count); // body
}
int count = 1; // initialisation
while (count <= 5) // condition
{
System.out.println (count); // body
count++; // change
}
The method used to find the first occurrence of a String in another String.
What is a ".indexOf(String_to_Find)"?
A conditional statement that parses through multiple values of a condition and runs the block of code on the matching one.
What is a switch statement?
This is the error that is thrown when the index value being manipulated on is outside 0 to N-1.
What is an ArrayIndexOutOfBoundsException?
System.out.printf ("Score %d: %d \n", i, scores(i) );
System.out.printf ("Score %d: %d \n", i, scores[i] );
The action of periodically returning the memory allocated to an object back to the system.
What is Garbage Collection?
The conditional statement which runs a block of code if the condition is true.
What is an if statement?
An example of this type of initialization is:
int[] units = new int[] {147, 323, 89, 933, 540, 269, 97, 114, 298, 476};
What is an Initializer List Initialization/Declaration?
if (name1.compareTo(name2) < 0)
System.out.println(name1 + "comes first");
elseif {
if (name1.compareTo(name2) == 0)
System.out.println("Same name");
elseif
System.out.println(name2 + "comes first");
}
if (name1.compareTo(name2) < 0)
System.out.println(name1 + "comes first");
else {
if (name1.compareTo(name2) == 0)
System.out.println("Same name");
else
System.out.println(name2 + "comes first");
}
The term used to refer to a String for not being able to make change its data.
What is Immutable?
A programming construct that allows a block of code to be executed repeatedly until a certain condition is met or it has executed a set number of time.
What is a For Loop?
The concept of tracking common data across more than one array, in order to store more than one data type.
What are Parallel Arrays?
for (int i=0; i<scores.length-1; i++) // traditional loop
System.out.println ( scores[i] );
for (int i=0; i<scores.length; i++) // traditional loop
System.out.println ( scores[i] );