Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
12 Cards in this Set
- Front
- Back
int [] a = new int [5] ; Creates an array of ___ integers. |
5 Integers |
|
int [] a = new int [5] ; a [0] = 2; Put the number ___ in the _______ position. |
2 in the first position. |
|
int [] a = new int [5] ; a [1] = 3; Put the number ___ in the _______ position. |
3 in the second position. |
|
int [] a = new int [5] ; a [2] = 5; Put the number ___ in the _______ position. |
5 in the third position. |
|
int [] a = new int [5] ; a [3] = 7; Put the number ___ in the _______ position. |
7 in the fourth position. |
|
int [] a = new int [5] ; a [4] = 11; Put the number ___ in the _______ position. |
11 in the fifth position. |
|
System.out.print(a[0] + ", "); System.out.print(a[1] + ", "); System.out.print(a[2] + ", "); System.out.print(a[3] + ", and "); System.out.println(a[4]); Would out put ... |
[ 2, 3, 5, 7, and 11 ] |
|
Random rnd = new Random(); Would generate... |
A new instance of the random class. |
|
int[] a = new int[100]; Creates an array of ____ integers. |
100 integers |
|
int[] a = new int[100]; for (int i = 0; i < a.length; i++) { a[i] = rnd.nextInt(); } Creates an array filled with _____ integers in the range of ... |
Random integers; all possible integers. |
|
int[] a = {1, 2 , 3, 4, 5, 6}; This is ... |
Another way to declare an array and fill it with values. |
|
Arrays can be of any data type, primitive or otherwise. (boolean, char, float, double, etc) |
True |