Java Ch 9 Quiz

10 Questions | Attempts: 111
Share

SettingsSettingsSettings
Java Quizzes & Trivia

Questions and Answers
  • 1. 
    True or False: Arrays cannot be passed as parameters into methods, but their elements can be passed individually.
    • A. 

      True

    • B. 

      False

  • 2. 
    Two-dimensional arrays are in ____ form.
  • 3. 
    True or False: The following array is of type String: String[] integers = new String[10];
    • A. 

      True

    • B. 

      False

  • 4. 
    True or False: The last index of the array above is 10.
    • A. 

      True

    • B. 

      False

  • 5. 
    One-dimensional arrays are in ____ form.
  • 6. 
    How many dimensions are in the following array: int[][][][][][] ndims = new int[5][5][5][5][5][5];
  • 7. 
    True or False: An array in Java can have any number of dimensions.
    • A. 

      True

    • B. 

      False

  • 8. 
    An exception is thrown when an array ____ goes out of bounds.
  • 9. 
    True or False: Multidimensional arrays are different from one-dimensional arrays in that they do not have a fixed number of components.
    • A. 

      True

    • B. 

      False

  • 10. 
    True or False: As with other arrays, you can use the operator new to instantiate multidimensional arrays.
    • A. 

      True

    • B. 

      False

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.