Suppose that we say:

Integer [] myarray = new Integer[1000];
for (int i = 0; i < 1000; i++)
   myarray[i] = new Integer(i);
About how many bytes are used by (a) the variable myarray, (b) what it points to, and (c) the total storage allocated by this code?

  • A: 8000, 8000 and 16000
  • B: 8, 8000 and 24000
  • C: 8, 8000 and 16000
  • D: 1000, 8000 and 9000
  • E: 1000, 8000 and 25000

    Answer

    Page-10    Prev    Next    Page+10