File I/O and Array Review

Consider the following method:
public static int mystery(int[] arr) {
   int x = 0;
   if(arr != null) {
      for(int i = 1; i < arr.length; i+=2) {
         x += arr[i];
      }
   }
   return x;
}

1. What is the value returned by mystery({0, 1, 2, 3, 4, 5})?   2. What is the value returned by mystery({3})?

A. 0                                                                                                 A. 0
B. 3                                                                                                 B. 3
C. 15                                                                                               C. 1
D. 4                                                                                                 D. An error occurs
E. 9



Suppose the file test.dat contains the following:
Abba 3  2  Elvis
18.5 Hello
-2

-------------------------
Consider the following method:
public static String mystery2(String fi) throws IOException {
   Scanner scan = new Scanner(new File(fi));
   String s;
   while(scan.hasNext()) {
      s = scan.next();
   }
   return s;
}

3. The call mystery2("test.dat") returns:
A. "Abba"
B. "AbbaElvisHello"
C. "3"
D. "-2"
E. "Abba32Elvis18.5Hello-2"