Exam 7: Arrays and the Arraylist Class

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following for loops is valid, given the following declaration? String[] names = {"abc", "def", "ghi", "jkl"};

(Multiple Choice)
4.9/5
(26)

For the following code, what would be the value of str[2]? String[] str = {"abc", "def", "ghi", "jkl"};

(Multiple Choice)
4.8/5
(35)

Each array in Java has a public field named ____________ that contains the number of elements in the array.

(Multiple Choice)
4.8/5
(28)

What would be the results of the following code? final int SIZE = 25; Int[] array1 = new int[SIZE]; … // Code that will put values in array1 Int value = 0; For (int a = 0; a <= array1.length; a++) { Value += array1[a]; }

(Multiple Choice)
4.9/5
(32)
Showing 61 - 64 of 64
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)