O'Reilly logo

Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition by Rolf W. Rasmussen, Khalid A. Mughal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Review Questions

4.1 Given the following declaration, which expression returns the size of the array, assuming the array has been initialized?
int[] array;

Select the one correct answer.

  1. array[].length()

  2. array.length()

  3. array[].length

  4. array.length

  5. array[].size()

  6. array.size()

4.2 Is it possible to create arrays of length zero?

Select the one correct answer.

  1. Yes, you can create arrays of any type with length zero.

  2. Yes, but only for primitive data types.

  3. Yes, but only for arrays of object references.

  4. No, you cannot create zero-length arrays, but the main() method may be passed a zero-length array of String references when no program arguments are specified. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required