Exam 7: Arrays and Array Lists

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

Assume the following variable has been declared and given a value as shown: Assume the following variable has been declared and given a value as shown:   Which is the value of data[1][2]? Which is the value of data[1][2]?

(Multiple Choice)
4.9/5
(41)

Your program needs to store an integer sequence of unknown length.Which of the following is most suitable to use?

(Multiple Choice)
4.9/5
(40)

A collection of test cases that can be used on future versions of a program is called:

(Multiple Choice)
4.8/5
(35)

Consider the following code snippet: Consider the following code snippet:   What is the value of numarray[1][2] after the code snippet is executed? What is the value of numarray[1][2] after the code snippet is executed?

(Multiple Choice)
4.7/5
(40)

Which one of the following statements about declaring an array list as a method parameter is true?

(Multiple Choice)
4.8/5
(34)

Consider the following line of code for calling a method named func1: func1(listData, varData); Which one of the following method headers is valid for func1, where listData is an integer array list and varData is an integer variable?

(Multiple Choice)
4.7/5
(47)

In a partially filled array, the number of slots in the array that are not currently used is the

(Multiple Choice)
4.7/5
(40)

The integer array numbers will be filled with values from the Scanner object in.If there are more input values than there are spaces in the array, only enough values to fill the array should be read.The integer variable currentSize should be set to the number of values read.Partial code to do this is given below: The integer array numbers will be filled with values from the Scanner object in.If there are more input values than there are spaces in the array, only enough values to fill the array should be read.The integer variable currentSize should be set to the number of values read.Partial code to do this is given below:   What condition will complete this code? What condition will complete this code?

(Multiple Choice)
4.7/5
(41)

Which one of the following code snippets accepts the integer input in an array list named num1 and stores the odd integers of num1 in another array list named oddnum?

(Multiple Choice)
4.8/5
(32)

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

(Multiple Choice)
4.8/5
(41)

If a programmer confuses the method required for checking the length of a string and uses size() instead of length(), what will happen?

(Multiple Choice)
4.7/5
(31)

Consider the telephone book as a physical object that can help understand algorithms.What kind of algorithm might be visualized using it?

(Multiple Choice)
4.8/5
(37)

Assume the array of integers values has been created.Which condition must be used in the indicated area so the loop below will assign max the largest value in values? Assume the array of integers values has been created.Which condition must be used in the indicated area so the loop below will assign max the largest value in values?

(Multiple Choice)
4.8/5
(30)

What is the output of the following statements? What is the output of the following statements?

(Multiple Choice)
5.0/5
(28)

Why is the use of physical objects helpful in algorithm design?

(Multiple Choice)
4.9/5
(38)

Which one of the following is the correct definition for initializing data in a two-dimensional array with three rows and two columns?

(Multiple Choice)
4.7/5
(39)

Consider the following code snippet: Consider the following code snippet:   In Java 6 and later, which statement copies the data array to the data2 array? In Java 6 and later, which statement copies the data array to the data2 array?

(Multiple Choice)
4.9/5
(40)

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

(Multiple Choice)
4.9/5
(34)

What is the value of the count variable after the execution of the code snippet below? What is the value of the count variable after the execution of the code snippet below?

(Multiple Choice)
4.9/5
(28)

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

(Multiple Choice)
4.8/5
(32)
Showing 81 - 100 of 117
close modal

Filters

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