Exam 7: Arrays and Array Lists

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

Assume the method doSomething has been defined as follows: Assume the method doSomething has been defined as follows:   What does the method do? What does the method do?

(Multiple Choice)
4.8/5
(33)

Java 7 introduced enhanced syntax for declaring array lists, which is termed

(Multiple Choice)
4.7/5
(39)

Complete the following code snippet with the correct enhanced for loop so it iterates over the array without using an index variable. Complete the following code snippet with the correct enhanced for loop so it iterates over the array without using an index variable.

(Multiple Choice)
4.8/5
(30)

What will be printed by the statements below? What will be printed by the statements below?

(Multiple Choice)
4.9/5
(41)

Assume the array of integers values has been created and process is a method that has a single integer parameter.Which of the following is equivalent to the loop below? Assume the array of integers values has been created and process is a method that has a single integer parameter.Which of the following is equivalent to the loop below?

(Multiple Choice)
4.8/5
(31)

What is the result of the following code? What is the result of the following code?

(Multiple Choice)
4.9/5
(37)

When the order of the elements is unimportant, what is the most efficient way to remove an element from an array?

(Multiple Choice)
4.8/5
(31)

What (if anything) is wrong with the following code snippet, which searches for the searchedValue variable in the array data? What (if anything) is wrong with the following code snippet, which searches for the searchedValue variable in the array data?

(Multiple Choice)
5.0/5
(25)

What is the output of the following code snippet? What is the output of the following code snippet?

(Multiple Choice)
4.8/5
(36)

Which one of the following statements is correct about the given code snippet? Which one of the following statements is correct about the given code snippet?

(Multiple Choice)
4.9/5
(43)

What will be printed by the statements below? What will be printed by the statements below?

(Multiple Choice)
4.8/5
(36)

Which code snippet calculates the sum of all the elements in even positions in an array?

(Multiple Choice)
5.0/5
(23)

Consider the code snippet below: Consider the code snippet below:   When the loop finishes what does the value of the boolean variable found indicate? When the loop finishes what does the value of the boolean variable found indicate?

(Multiple Choice)
4.8/5
(38)

When an array myArray is only partially filled, how can the programmer keep track of the current number of elements?

(Multiple Choice)
4.7/5
(35)

Which statement is true about the code snippet below? Which statement is true about the code snippet below?

(Multiple Choice)
4.9/5
(28)

Consider the following code snippet: Consider the following code snippet:   What is the output of the given code snippet? What is the output of the given code snippet?

(Multiple Choice)
4.9/5
(42)

Which one of the following is a valid signature of a method with an integer two-dimensional array parameter of size 10 x 10?

(Multiple Choice)
4.8/5
(40)
Showing 101 - 117 of 117
close modal

Filters

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