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: 4000, 4000 and 24000
  • B: 4, 4000 and 20000
  • C: 4, 4000 and 8000
  • D: 1000, 4000 and 9000
  • E: 1000, 4000 and 21000

    Answer

    Page-10    Prev    Next    Page+10