JAVA Chapter 7

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

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

NOT ghi

Given the following two-dimensional array declaration, which statement is true?int[][] numbers = new int[6][9];

The numbers array has 54 rows. NOT

A partially filled array is normally used ________.

with an accompanying integer value that holds the number of items stored in the array

A ragged array is ________.

a two-dimensional array where the rows have different numbers of columns

If numbers is a two-dimensional array, which of the following would give the number of columns in row r?

numbers.length[r] NOT

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

size NOT

By default, Java initializes array elements to ________.

0

In Java, you do not use the new operator when you use a(n) ________.

array size declarator NOT

Given that String[] str has been initialized, to get a copy of str[0] with all the characters converted to uppercase, you would use the ________ statement.

str.toUpperCase(); NOT

A(n) ________ is used as an index to pinpoint a specific element within an array.

subscript


संबंधित स्टडी सेट्स

BYUI GEOG 120 Exam 2 (Europe-Oceania)

View Set

Additional Peds Questions (Exam 1)

View Set

The Concept Of Acceptance And Empathy In The Social Worker-Client/Client System Relationship

View Set

Chapter 29: Management of Patients with Nonmalignant Hematologic Disorders

View Set

acc exam 3 concept questions ch.10

View Set

Το εσωτερικό ενός Η/Υ

View Set

A&P I Chapters 12, and 13 Lab - Nervous System

View Set

Modus Ponens & more... Phil 101 Test #2

View Set

OB - Infertility and Contraception

View Set

Mental Health Chapter 26: Outward-Focused Emotions: Violence

View Set