Deck 10: Introduction to Arrays

ملء الشاشة (f)
exit full mode
سؤال
The items in an array are called ____.

A) elements
B) values
C) variables
D) objects
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
When an array is not full, one must replace the array's logical size with its physical length in the loop.
سؤال
When referring to an array element, the subscript operator is ____.

A) .
B) { }
C) [ ]
D) < >
سؤال
When referring to an array element, the method selector is ____.

A) .
B) { }
C) [ ]
D) < >
سؤال
Once an array is instantiated, its size cannot be changed. ____________________
سؤال
When setting up an array, you need to instantiate an array object and assign it to the array declaration. ____________________
سؤال
An item's position within an array is called its ____.

A) index
B) subscript
C) path
D) both a and b are true.
سؤال
In an array, the first element is numbered 1.
سؤال
Array variables are blank before they are assigned array objects. ____________________
سؤال
The JVM checks the values of subscripts before using them and throws an exception if they are out of bounds.
سؤال
Each array variable must be declared in its own statement.
سؤال
For any particular array, all of the elements must be of the same type.
سؤال
An array with elements numbered 0 to 99 has a length of 99. ____________________
سؤال
It is important to remember the length of an array when working with it.
سؤال
The basic syntax for referring to an array ____ has the form [].

A) length
B) element
C) name
D) initializer
سؤال
In order to set up an array, you need to declare an array variable.
سؤال
The index of an array cell ranges from 1 to the length of the array minus 1. ____________________
سؤال
To have two variables refer to two separate arrays that happen to contain the same values, copy all of the elements from one array to the other.
سؤال
The detection of a range-bound error is similar to the JVM's behavior when a program attempts to divide by zero.
سؤال
An enhanced for loop is simpler to write than a standard for loop with an index.
سؤال
Ravi must indicate an array's ____ in the loop when the array is not full.

A) logical size
B) first value
C) last value
D) physical length
سؤال
When an object is used as a(n) ____ to a method, what gets passed is a reference to the object and not the object itself.

A) variable
B) element
C) initializer
D) parameter
سؤال
To access the ____ cell in an array, use the expression .length - 1

A) first
B) last
C) second to last
D) None of the above
سؤال
Arrays can be declared, instantiated, and initialized in one step. The list of numbers between the braces is called a(n) ____________________ list.
سؤال
Arrays are ____ and must be instantiated before being used.

A) values
B) variables
C) objects
D) strings
سؤال
The Boolean variable ____ is used to break out of a loop if a particular number is in an array.

A) break
B) found
C) stop
D) true
سؤال
An array with 20 ints that receives 5 ints from interactive input has a(n) ____ size of 5.

A) actual
B) physical
C) logical
D) variable
سؤال
An array with 20 ints that receives 5 ints from interactive input has a(n) ____ size of 20.

A) actual
B) physical
C) logical
D) variable
سؤال
A(n) ____ loop visits each element in an array from the first position to the last position.

A) enhanced for
B) initializer
C) logical
D) parallel
سؤال
Organizing code into two classes called the ____ and the view splits the code between managing the interface and manipulating the database.

A) model
B) GUI
C) application
D) widget
سؤال
FIGURE 10-2 <strong>FIGURE 10-2   Alex is trying to find the first location of a value in the array. The variable loc initially equals ____.</strong> A) null B) -1 C) 0 D) 1 <div style=padding-top: 35px>
Alex is trying to find the first location of a value in the array. The variable loc initially equals ____.

A) null
B) -1
C) 0
D) 1
سؤال
FIGURE 10-2 <strong>FIGURE 10-2   In Figure 10-2 above, all of the following is true EXCEPT ____.</strong> A) The method changes the student's name to Bill. B) After the method finishes executing, the name is still Bill. C) The actual and formal parameters do not refer to the same object. D) Changes the method makes to the object's state are still in effect after the method terminates. <div style=padding-top: 35px>
In Figure 10-2 above, all of the following is true EXCEPT ____.

A) The method changes the student's name to Bill.
B) After the method finishes executing, the name is still Bill.
C) The actual and formal parameters do not refer to the same object.
D) Changes the method makes to the object's state are still in effect after the method terminates.
سؤال
The ____ symbol on a button in a GUI interface moves to the first record in the database and displays its data.

A) 1
B) <<
C) >>
D) <
سؤال
FIGURE 10-1 <strong>FIGURE 10-1   Figure 10-1 above shows ____.</strong> A) two values referring to the same array variable B) an array with two strings of values C) an array with two names D) two variables referring to the same array object <div style=padding-top: 35px>
Figure 10-1 above shows ____.

A) two values referring to the same array variable
B) an array with two strings of values
C) an array with two names
D) two variables referring to the same array object
سؤال
The ____ symbol on a button in a GUI interface moves to the last record in the database and displays its data.

A) [end]
B) <<
C) >>
D) <
سؤال
The simplest way to add a data element to an array is to ____.

A) place it after the last available item
B) place it before the first available item
C) increase the physical size
D) increase the logical size
سؤال
A(n) ____________________ is a data structure consisting of an ordered collection of similar items.
سؤال
If you want to keep a list of peoples' names and ages, you can use two arrays in which corresponding elements are related by using ____ arrays.

A) logical
B) double
C) duplicate
D) parallel
سؤال
A(n) ____________________ is a loop that iterates through an array one element at a time.
سؤال
In a GUI, you should define a separate ____ class for each command button.

A) array
B) variable
C) listener
D) initializer
سؤال
When an array is instantiated, each cell is ____________________ until reset to a new object.
سؤال
Identify the letter of the choice that best matches the phrase or definition.
a.Index
b.Range
c.Null
d.Count
e.Break
A subscript of a value of -1 results in a(n) ____-bound error.
سؤال
Identify the letter of the choice that best matches the phrase or definition.
a.Index
b.Range
c.Null
d.Count
e.Break
An item's position in an array.
سؤال
Identify the letter of the choice that best matches the phrase or definition.
a.Index
b.Range
c.Null
d.Count
e.Break
Failure to assign an array object can result in a(n) ____ pointer exception.
سؤال
In a GUI, the ____________________ sets the title of the window, sets its closing action, and adds the widgets to the panels.
سؤال
Identify the letter of the choice that best matches the phrase or definition.
a.Index
b.Range
c.Null
d.Count
e.Break
This statement can be used to terminate an enhanced for loop early.
سؤال
Identify the letter of the choice that best matches the phrase or definition.
a.Index
b.Range
c.Null
d.Count
e.Break
This variable could be used to track the number of items input.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/47
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 10: Introduction to Arrays
1
The items in an array are called ____.

A) elements
B) values
C) variables
D) objects
A
2
When an array is not full, one must replace the array's logical size with its physical length in the loop.
False
3
When referring to an array element, the subscript operator is ____.

A) .
B) { }
C) [ ]
D) < >
C
4
When referring to an array element, the method selector is ____.

A) .
B) { }
C) [ ]
D) < >
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
5
Once an array is instantiated, its size cannot be changed. ____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
6
When setting up an array, you need to instantiate an array object and assign it to the array declaration. ____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
7
An item's position within an array is called its ____.

A) index
B) subscript
C) path
D) both a and b are true.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
8
In an array, the first element is numbered 1.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
9
Array variables are blank before they are assigned array objects. ____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
10
The JVM checks the values of subscripts before using them and throws an exception if they are out of bounds.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
11
Each array variable must be declared in its own statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
12
For any particular array, all of the elements must be of the same type.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
13
An array with elements numbered 0 to 99 has a length of 99. ____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
14
It is important to remember the length of an array when working with it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
15
The basic syntax for referring to an array ____ has the form [].

A) length
B) element
C) name
D) initializer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
16
In order to set up an array, you need to declare an array variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
17
The index of an array cell ranges from 1 to the length of the array minus 1. ____________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
18
To have two variables refer to two separate arrays that happen to contain the same values, copy all of the elements from one array to the other.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
19
The detection of a range-bound error is similar to the JVM's behavior when a program attempts to divide by zero.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
20
An enhanced for loop is simpler to write than a standard for loop with an index.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
21
Ravi must indicate an array's ____ in the loop when the array is not full.

A) logical size
B) first value
C) last value
D) physical length
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
22
When an object is used as a(n) ____ to a method, what gets passed is a reference to the object and not the object itself.

A) variable
B) element
C) initializer
D) parameter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
23
To access the ____ cell in an array, use the expression .length - 1

A) first
B) last
C) second to last
D) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
24
Arrays can be declared, instantiated, and initialized in one step. The list of numbers between the braces is called a(n) ____________________ list.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
25
Arrays are ____ and must be instantiated before being used.

A) values
B) variables
C) objects
D) strings
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
26
The Boolean variable ____ is used to break out of a loop if a particular number is in an array.

A) break
B) found
C) stop
D) true
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
27
An array with 20 ints that receives 5 ints from interactive input has a(n) ____ size of 5.

A) actual
B) physical
C) logical
D) variable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
28
An array with 20 ints that receives 5 ints from interactive input has a(n) ____ size of 20.

A) actual
B) physical
C) logical
D) variable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
29
A(n) ____ loop visits each element in an array from the first position to the last position.

A) enhanced for
B) initializer
C) logical
D) parallel
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
30
Organizing code into two classes called the ____ and the view splits the code between managing the interface and manipulating the database.

A) model
B) GUI
C) application
D) widget
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
31
FIGURE 10-2 <strong>FIGURE 10-2   Alex is trying to find the first location of a value in the array. The variable loc initially equals ____.</strong> A) null B) -1 C) 0 D) 1
Alex is trying to find the first location of a value in the array. The variable loc initially equals ____.

A) null
B) -1
C) 0
D) 1
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
32
FIGURE 10-2 <strong>FIGURE 10-2   In Figure 10-2 above, all of the following is true EXCEPT ____.</strong> A) The method changes the student's name to Bill. B) After the method finishes executing, the name is still Bill. C) The actual and formal parameters do not refer to the same object. D) Changes the method makes to the object's state are still in effect after the method terminates.
In Figure 10-2 above, all of the following is true EXCEPT ____.

A) The method changes the student's name to Bill.
B) After the method finishes executing, the name is still Bill.
C) The actual and formal parameters do not refer to the same object.
D) Changes the method makes to the object's state are still in effect after the method terminates.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
33
The ____ symbol on a button in a GUI interface moves to the first record in the database and displays its data.

A) 1
B) <<
C) >>
D) <
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
34
FIGURE 10-1 <strong>FIGURE 10-1   Figure 10-1 above shows ____.</strong> A) two values referring to the same array variable B) an array with two strings of values C) an array with two names D) two variables referring to the same array object
Figure 10-1 above shows ____.

A) two values referring to the same array variable
B) an array with two strings of values
C) an array with two names
D) two variables referring to the same array object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
35
The ____ symbol on a button in a GUI interface moves to the last record in the database and displays its data.

A) [end]
B) <<
C) >>
D) <
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
36
The simplest way to add a data element to an array is to ____.

A) place it after the last available item
B) place it before the first available item
C) increase the physical size
D) increase the logical size
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
37
A(n) ____________________ is a data structure consisting of an ordered collection of similar items.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
38
If you want to keep a list of peoples' names and ages, you can use two arrays in which corresponding elements are related by using ____ arrays.

A) logical
B) double
C) duplicate
D) parallel
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
39
A(n) ____________________ is a loop that iterates through an array one element at a time.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
40
In a GUI, you should define a separate ____ class for each command button.

A) array
B) variable
C) listener
D) initializer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
41
When an array is instantiated, each cell is ____________________ until reset to a new object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
42
Identify the letter of the choice that best matches the phrase or definition.
a.Index
b.Range
c.Null
d.Count
e.Break
A subscript of a value of -1 results in a(n) ____-bound error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
43
Identify the letter of the choice that best matches the phrase or definition.
a.Index
b.Range
c.Null
d.Count
e.Break
An item's position in an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
44
Identify the letter of the choice that best matches the phrase or definition.
a.Index
b.Range
c.Null
d.Count
e.Break
Failure to assign an array object can result in a(n) ____ pointer exception.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
45
In a GUI, the ____________________ sets the title of the window, sets its closing action, and adds the widgets to the panels.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
46
Identify the letter of the choice that best matches the phrase or definition.
a.Index
b.Range
c.Null
d.Count
e.Break
This statement can be used to terminate an enhanced for loop early.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
47
Identify the letter of the choice that best matches the phrase or definition.
a.Index
b.Range
c.Null
d.Count
e.Break
This variable could be used to track the number of items input.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.