1). The user expects this to create a Scanner from the filename "test.dat". Unfortunately, Java doesn't do that -- it creates a Scanner from the literal String "test.dat" instead of opening a File. 2). (B) -- We successfully create a scanner reading the file by 1] creating a new File from "example.txt" 2] creating a new Scanner from that File 3] assigning the resulting Scanner to a Scanner variable, input 3). (B) -- Tokens are delimited by whitespace. 4). (D) -- All variable declarations have 1] a type 2] a name 3] an assignment to a right-hand-side expression (optional) 5). a] numbers[0] b] numbers[9] (since the length is 10 we know the valid index range is 0-9 c] numbers[numbers.length - 1] 6). int low = 6; int high = 38; int low_odd = low % 2; int high_odd = high % 2; int dist = (high - low + 1 + low_odd + high_odd) / 2; int[] odd = new int[dist]; int index = 0; for (int num = low + (1 - low_odd); num <= high; num += 2) { odd[index] = num; ++index; } } 7). int[] numbers = new int[8]; +--+--+--+--+--+--+--+--+ | 0| 0| 0| 0| 0| 0| 0| 0| +--+--+--+--+--+--+--+--+ numbers[1] = 4; +--+--+--+--+--+--+--+--+ | 0| 4| 0| 0| 0| 0| 0| 0| +--+--+--+--+--+--+--+--+ numbers[4] = 99; +--+--+--+--+--+--+--+--+ | 0| 4| 0| 0|99| 0| 0| 0| +--+--+--+--+--+--+--+--+ numbers[7] = 2; +--+--+--+--+--+--+--+--+ | 0| 4| 0| 0|99| 0| 0| 2| +--+--+--+--+--+--+--+--+ int x = numbers[1]; // x is now 4 numbers[x] = 44; +--+--+--+--+--+--+--+--+ | 0| 4| 0|44|99| 0| 0| 2| +--+--+--+--+--+--+--+--+ numbers[numbers[7]] = 11; // numbers[7] is 2 +--+--+--+--+--+--+--+--+ | 0| 4|11|44|99| 0| 0| 2| +--+--+--+--+--+--+--+--+