Ovido
Taal
  • Engels
  • Spaans
  • Frans
  • Portugees
  • Duits
  • Italiaans
  • Nederlands
  • Zweeds
Tekst
  • Hoofdletters

Gebruiker

  • Inloggen
  • Account aanmaken
  • Upgrade naar Premium
Ovido
  • Startpagina
  • Inloggen
  • Account aanmaken

Java 2 Chapter 8 review study

An array is a list of data items that all _________________.

have the same type

When you declare an array, _________________.

you might reserve memory for it in the same statement

For how many integers does the following statement reserve room?
int[] values = new int[34];

34

Which of the following can be used as an array subscript?

int

If you declare an array as follows, how do you indicate the final element of the array?

int[] nums = new int[6];

nums[5]

If you declare an integer array as follows, what is the value of nums[2]?
int[] nums = {101, 202, 303, 404, 505, 606};

303

When you initialize an array by giving it values upon creation, you _________________.

do not explicitly give the array a size

In Java, you can declare an array of 12 elements and initialize _________________.

all of them

Assume x is an integer and an array is declared as follows. Which of the following statements correctly assigns the value 100 to each of the array elements?
int[] nums = new int[4];

for(x = 0; x < 4; ++x) nums[x] = 100;

uppose you have declared an array as follows:
int[] creditScores = {670, 720, 815};

What is the value of creditScores.length?

3

A parallel array is one that _________________.

holds values that correspond to those in another array

When you pass an array element to a method, the method receives _________________.

a copy of the value in the element

A single array element of a primitive type is passed to a method by _________________.

value

When you pass an array to a method, the method receives _________________.

the address of the array

When you place objects in order beginning with the object with the highest value, you are sorting in _________________ order.

descending

Using a bubble sort involves comparing each array element with _________________.

the adjacent element

The following defines a _________________ array:
int[][] nums = { {1, 2}, {3, 4}, {5, 6} };

two-dimensional

How many rows are contained in the following array?
double[] [] prices = {{2.56,3.57,4.58,5.59},{12.35,13.35,14.35,15.00}};

2

In the following array, what is the value of codes[2][1]?
char[] [] codes = {'A','D','M'},{'P','R','S'},{'U','V','Z'};

'V'

The methods in the Arrays class _________________.

are static methods

Quiz
Java 2 chapter 9 review study
LED fakta
Suffixes Forming Adjectives
voc 4 (america's gun culture)
Ljustekniska storheter och enheter
16 LERNWORTSCHATS
Verb
Suffixes Forming Nouns
intro to transpo L1
Kapitel 2
Ljusfördelning och avbländning
Art and power : the power of music
its PL1
svt 2
Mossor
H1 zinnen
inflation
Duits schritt 41 (3vwo)
herman vocab 28
نکاتی که سختن
نکاتی که سختن
voc 2
biologia
USCP FINAL
HOPE 1
gastrulacion
social
vicios de lenguaje
psychology approaches
tora
glosor v.39
engels woordjes h1
wush
TRIP
sooo
KOTOBA PM LEMBAR 2
Purcomm
Frans E1 (3 vwo a)
Glosor v.39
Frans B1 (3 vwo a)
Frans A1(3 vwo a)
HISTORY OF TRAVEL & TOURISM EARLY TOURISM TWO FORMS: 1. Travel for Business.
strategic business analysis
Science Exam_
NGO SO periode 1
English Exam_
CLE Exam_
EARTH AND LIFE SCIENCE
PR2
math