Deck 9: Multidimensional Arrays and the Arraylist Class

Full screen (f)
exit full mode
Question
In an array of floats, each element contains a float value. What is true about the array?

A) Each element contains a double value.
B) The array is declared with a primitive type element.
C) The array requires three sets of empty brackets.
D) Float points to the location of the class.
Use Space or
up arrow
down arrow
to flip the card.
Question
The ArrayList class uses generics, which are:

A) parameterized types, meaning that the data type will be defined at the time a client class declares and instantiates an object of the class.
B) parameterized types, meaning that programmers must specify the class of the objects they use.
C) initialized types, meaning that programmers can design a code class without specifying the class of the objects they use.
D) None of these is correct.
Question
Why can you not print the contents of an array using only the array name?

A) Java does not support aggregate operations on multidimensional arrays.
B) Java does not support aggregate operations on single-dimensional arrays.
C) Each element in an array must be processed individually.
D) All of these are correct.
Question
Jessica wants to design a search engine for an online dictionary of software-related terms. Which class should she use?

A) Array class
B) Auto class
C) ArrayList class
D) Assign class
Question
In the following method, what type of object is returned (the answer has been omitted on purpose)?
Set( int index, E element )

A) It returns a boolean value.
B) It returns void.
C) It returns int.
D) It returns the data type of the ArrayList.
Question
The syntax for declaring a multidimensional array requires the brackets to follow the array name.
Question
The general pattern for processing the elements of column j of a two-dimensional array called arrayName uses a single for loop.
Question
The enhanced for loop enables looping through the ArrayList objects automatically.
Question
Multidimensional arrays are useful for which of the following?

A) You want to organize data along several dimensions.
B) You want to assign values after instantiating a list.
C) There is not a lot of data to store in memory.
D) None of these is correct.
Question
_____________ arrays allow us to represent data organized along n dimensions with a single array.

A) Floating
B) Dual
C) Multidimensional
D) None of these is correct.
Question
Why would you want to insert a comma between two array names in one statement?

A) It allows you to instantiate multiple multidimensional arrays of the same data type.
B) It allows you to declare multiple multidimensional arrays of different data types.
C) It allows you to declare multiple multidimensional arrays of the same data type.
D) It allows you to instantiate single arrays of the same data type.
Question
Which of the following are errors in this syntax declaring a two-dimensional array?
Datatype [4] [0] [3] arrayName:

A) The brackets must be empty.
B) There must be two brackets, not three.
C) The syntax must end in a semicolon, not a colon.
D) All of these are errors in the syntax.
Question
The syntax for instantiating a two-dimensional array, where rows are numberOfMonths, columns are numberOfStudents, the array name is starStudent, and the data type is double, can look something like this:
starStudent = new double [numberOfMonths][numberOfStudents];
Question
When a multidimensional array is instantiated, elements of arrays with numeric types are initialized to null.
Question
Why is it a good idea to check that the current column number is less than arrayName[i].length before attempting to access arrayName[i][j]?

A) Rows might have a different number of columns.
B) Accessing columns that do not exist will result in ArrayIndexOutofBoundsException at run time.
C) The column number must be within the range of 0 to arrayName[i].length - 1.
D) All of these are correct.
Question
In the outer for loop, using the condition i <= arrayName.length will result in:

A) a compiler error.
B) ArrayIndexOutOfBoundsException.
C) ArrayInBoundsException.
D) None of these is correct.
Question
After each completion of the inner loop when processing a row of a two-dimensional array, what must be done?

A) Initialize the processing variables for the current row.
B) Finish processing the current row.
C) Calculate the minimum value.
D) All of these are correct.
Question
This code would generate compiler errors.
for ( int i = 0; i < arrayName.length; i++ )
{
for ( int j = 0; j < arrayName[i].length; j++ )
{
// process element arrayName[i][j]
}
}
Question
To process elements of a three-dimensional array, use a double for loop.
Question
Programmers can reuse code from the ArrayList class.
Question
Use add( E element ) in the ArrayList class to update a list of slang terms with additional terms.
Question
How many empty sets of brackets are needed to declare an array?

A) One
B) Two
C) At least two sets are needed
D) It depends on how many dimensions are involved
Question
Initiating a two-dimensional array and then instantiating each row as a single-dimensional array will accomplish which of the following?

A) An array may have a different number of rows for each column.
B) An array may have a different number of columns for each row.
C) An array will have the same number of rows and columns.
D) There is not enough information to draw a conclusion.
Question
What is the purpose of this code?
For ( int i = 0; i < arrayName.length; i++ )
{
For ( int j = 0; j < arrayName[i].length; j++ )
{
// process element arrayName[i][j]
}
}

A) It is the general pattern for processing the elements of a two-dimensional array called arrayName in row-first, column-second order.
B) It is the general pattern for processing the elements of a single-dimensional array called arrayName in row-first, column-second order.
C) It is the general pattern for processing the elements of a two-dimensional array called arrayName in column-first, row-second order.
D) There is not enough information to draw a conclusion.
Question
What is the name of the method that returns the number of elements in an ArrayList object?

A) size
B) number
C) length
Question
In the header for ( Auto current : autos ):

A) Auto is an ArrayList.
B) current is an ArrayList.
C) autos is an ArrayList.
Question
In the header for ( Auto current : autos ):

A) Auto represents the Auto object that will be processed inside the loop body.
B) current represents the Auto object that will be processed inside the loop body.
C) autos represents the Auto object that will be processed inside the loop body.
Question
An ArrayList is not expandable.
Question
Three-dimensional arrays are not allowed in Java.
Question
We can store primitive data types in an ArrayList object.
Question
The ArrayList class uses generics.
Question
The name of the method that enables us to delete an element at a specified index in an ArrayList is __________.
Question
The __________ enables looping through an ArrayList object without using a counter and without using the get method to access each object.
Question
To access the element at row i and column j of a two-dimensional array named grades, we would use which of the following?

A) grades
B) grades[ i ][ j ]
C) grades[ j ][ i ]
D) grades( i )( j )
E) grades( j )( i )
Question
To access the number of rows in a two-dimensional array named grades, we would use which of the following?

A) grades
B) grades.size( )
C) grades.size
D) grades.length( )
E) grades.length
Question
To access the number of columns in row i of a two-dimensional array named grades, we would use which of the following?:

A) grades.length
B) grades[ i ].length
C) grades( i ).length
D) grades( i ).size
E) grades{ i }.length
Question
When processing all the elements of row i of a two-dimensional array named grades using a for loop with variable j, what is the condition of the for loop?

A) j < length
B) j < grades.length
C) j <= grades.length
D) j < grades[i].length
E) j <= grades[i].length
Question
The ArrayList class belongs to which package?

A) java.lang
B) java.text
C) java.util
D) java.list
E) java.array
Question
How do you declare an ArrayList object reference of Book objects named books?

A) ArrayList< > books;
B) ArrayList books;
C) ArrayList books;
D) ArrayList books;
E) ArrayList Book;
Question
An ArrayList object reference of Book objects named books has already been declared. How do you instantiate it using the ArrayList default constructor?

A) books = new ArrayList( );
B) books = new ArrayList( );
C) books = new ArrayList( );
D) books = new Book( );
E) books = new Book( );
Question
When declaring a two-dimensional array, we use two sets of square brackets.
Question
We can instantiate a two-dimensional array by assigning values when the array is declared.
Question
In a two-dimensional array, the number of elements in each row must be the same for every row.
Question
We cannot combine the declaration and instantiation of a multidimensional array.
Question
To process all the elements of a two-dimensional array, we use a double loop.
Question
We can pass a two-dimensional array parameter to a method.
Question
A method cannot return a two-dimensional array parameter.
Question
A two-dimensional array is an array of __________.
Question
When processing the elements of a two-dimensional array one row at a time, we should __________ the row processing variables before processing each row.
Question
An ArrayList automatically __________ its capacity as needed.
Question
If we want to store primitive data types in an ArrayList object, then we should use __________ classes.
Question
The ArrayList class uses generics; thus, the data type used is defined at a time the __________ class declares and instantiates an ArrayList object.
Question
The name of the method that enables us to append an element to the end of an ArrayList is __________.
Question
Identify how to instantiate a two-dimensional array by assigning initial values when the array is declared.
Question
Compare the function of the following two statements:
arrayName.length
arrayName[i].length
Question
When processing all the elements of a column of a two-dimensional array, what possible runtime error do we have to worry about?
Question
Simeon wants to keep track of his batting average for each day of each week of the next baseball season. Evaluate what is wrong with this code and recommend an alternative code.
double [ ] battingAverage;
Question
Which keyword would you add to this code to instantiate the array, allocating memory for the array? Provide the updated code.
arrayName = datatype [exp1][exp2];
Question
Theorize why the following code would generate compiler errors:
Auto [4][12] cars;
Question
Theorize why the following code would generate compiler errors:
int [ ][ ] highTemps = new int [2][3];
highTemps = { { 89, 85, 98 },
{ 88, 90, 92 } };
Question
A code written to analyze the average high temperatures in four cities for June, July, and August was set up so that the cities are the rows. Evaluate the results of this code:
avgHighTemps[2][0] = 75.2; // row 2
avgHighTemps[2][1] = 82.3;
avgHighTemps[2][2] = 78.5;
avgHighTemps[2][3] = 71.6;
Question
Compare lines 22-23 with 27-28 and explain how the results will differ.
21 System.out.println( "\nUsing the enhanced for loop:" );
22 for ( Integer currentInteger : list )
23 System.out.print( currentInteger + "\t" );
24 System.out.println( );
25
26 System.out.println( "\nUsing unboxing and enhanced for loop:" );
27 for ( int currentInt : list ) // unboxing
28 System.out.print( currentInt + "\t" );
29 System.out.println( );
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/62
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 9: Multidimensional Arrays and the Arraylist Class
1
In an array of floats, each element contains a float value. What is true about the array?

A) Each element contains a double value.
B) The array is declared with a primitive type element.
C) The array requires three sets of empty brackets.
D) Float points to the location of the class.
B
2
The ArrayList class uses generics, which are:

A) parameterized types, meaning that the data type will be defined at the time a client class declares and instantiates an object of the class.
B) parameterized types, meaning that programmers must specify the class of the objects they use.
C) initialized types, meaning that programmers can design a code class without specifying the class of the objects they use.
D) None of these is correct.
A
3
Why can you not print the contents of an array using only the array name?

A) Java does not support aggregate operations on multidimensional arrays.
B) Java does not support aggregate operations on single-dimensional arrays.
C) Each element in an array must be processed individually.
D) All of these are correct.
D
4
Jessica wants to design a search engine for an online dictionary of software-related terms. Which class should she use?

A) Array class
B) Auto class
C) ArrayList class
D) Assign class
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
5
In the following method, what type of object is returned (the answer has been omitted on purpose)?
Set( int index, E element )

A) It returns a boolean value.
B) It returns void.
C) It returns int.
D) It returns the data type of the ArrayList.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
6
The syntax for declaring a multidimensional array requires the brackets to follow the array name.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
7
The general pattern for processing the elements of column j of a two-dimensional array called arrayName uses a single for loop.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
8
The enhanced for loop enables looping through the ArrayList objects automatically.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
9
Multidimensional arrays are useful for which of the following?

A) You want to organize data along several dimensions.
B) You want to assign values after instantiating a list.
C) There is not a lot of data to store in memory.
D) None of these is correct.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
10
_____________ arrays allow us to represent data organized along n dimensions with a single array.

A) Floating
B) Dual
C) Multidimensional
D) None of these is correct.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
11
Why would you want to insert a comma between two array names in one statement?

A) It allows you to instantiate multiple multidimensional arrays of the same data type.
B) It allows you to declare multiple multidimensional arrays of different data types.
C) It allows you to declare multiple multidimensional arrays of the same data type.
D) It allows you to instantiate single arrays of the same data type.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
12
Which of the following are errors in this syntax declaring a two-dimensional array?
Datatype [4] [0] [3] arrayName:

A) The brackets must be empty.
B) There must be two brackets, not three.
C) The syntax must end in a semicolon, not a colon.
D) All of these are errors in the syntax.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
13
The syntax for instantiating a two-dimensional array, where rows are numberOfMonths, columns are numberOfStudents, the array name is starStudent, and the data type is double, can look something like this:
starStudent = new double [numberOfMonths][numberOfStudents];
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
14
When a multidimensional array is instantiated, elements of arrays with numeric types are initialized to null.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
15
Why is it a good idea to check that the current column number is less than arrayName[i].length before attempting to access arrayName[i][j]?

A) Rows might have a different number of columns.
B) Accessing columns that do not exist will result in ArrayIndexOutofBoundsException at run time.
C) The column number must be within the range of 0 to arrayName[i].length - 1.
D) All of these are correct.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
16
In the outer for loop, using the condition i <= arrayName.length will result in:

A) a compiler error.
B) ArrayIndexOutOfBoundsException.
C) ArrayInBoundsException.
D) None of these is correct.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
17
After each completion of the inner loop when processing a row of a two-dimensional array, what must be done?

A) Initialize the processing variables for the current row.
B) Finish processing the current row.
C) Calculate the minimum value.
D) All of these are correct.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
18
This code would generate compiler errors.
for ( int i = 0; i < arrayName.length; i++ )
{
for ( int j = 0; j < arrayName[i].length; j++ )
{
// process element arrayName[i][j]
}
}
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
19
To process elements of a three-dimensional array, use a double for loop.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
20
Programmers can reuse code from the ArrayList class.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
21
Use add( E element ) in the ArrayList class to update a list of slang terms with additional terms.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
22
How many empty sets of brackets are needed to declare an array?

A) One
B) Two
C) At least two sets are needed
D) It depends on how many dimensions are involved
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
23
Initiating a two-dimensional array and then instantiating each row as a single-dimensional array will accomplish which of the following?

A) An array may have a different number of rows for each column.
B) An array may have a different number of columns for each row.
C) An array will have the same number of rows and columns.
D) There is not enough information to draw a conclusion.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
24
What is the purpose of this code?
For ( int i = 0; i < arrayName.length; i++ )
{
For ( int j = 0; j < arrayName[i].length; j++ )
{
// process element arrayName[i][j]
}
}

A) It is the general pattern for processing the elements of a two-dimensional array called arrayName in row-first, column-second order.
B) It is the general pattern for processing the elements of a single-dimensional array called arrayName in row-first, column-second order.
C) It is the general pattern for processing the elements of a two-dimensional array called arrayName in column-first, row-second order.
D) There is not enough information to draw a conclusion.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
25
What is the name of the method that returns the number of elements in an ArrayList object?

A) size
B) number
C) length
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
26
In the header for ( Auto current : autos ):

A) Auto is an ArrayList.
B) current is an ArrayList.
C) autos is an ArrayList.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
27
In the header for ( Auto current : autos ):

A) Auto represents the Auto object that will be processed inside the loop body.
B) current represents the Auto object that will be processed inside the loop body.
C) autos represents the Auto object that will be processed inside the loop body.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
28
An ArrayList is not expandable.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
29
Three-dimensional arrays are not allowed in Java.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
30
We can store primitive data types in an ArrayList object.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
31
The ArrayList class uses generics.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
32
The name of the method that enables us to delete an element at a specified index in an ArrayList is __________.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
33
The __________ enables looping through an ArrayList object without using a counter and without using the get method to access each object.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
34
To access the element at row i and column j of a two-dimensional array named grades, we would use which of the following?

A) grades
B) grades[ i ][ j ]
C) grades[ j ][ i ]
D) grades( i )( j )
E) grades( j )( i )
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
35
To access the number of rows in a two-dimensional array named grades, we would use which of the following?

A) grades
B) grades.size( )
C) grades.size
D) grades.length( )
E) grades.length
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
36
To access the number of columns in row i of a two-dimensional array named grades, we would use which of the following?:

A) grades.length
B) grades[ i ].length
C) grades( i ).length
D) grades( i ).size
E) grades{ i }.length
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
37
When processing all the elements of row i of a two-dimensional array named grades using a for loop with variable j, what is the condition of the for loop?

A) j < length
B) j < grades.length
C) j <= grades.length
D) j < grades[i].length
E) j <= grades[i].length
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
38
The ArrayList class belongs to which package?

A) java.lang
B) java.text
C) java.util
D) java.list
E) java.array
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
39
How do you declare an ArrayList object reference of Book objects named books?

A) ArrayList< > books;
B) ArrayList books;
C) ArrayList books;
D) ArrayList books;
E) ArrayList Book;
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
40
An ArrayList object reference of Book objects named books has already been declared. How do you instantiate it using the ArrayList default constructor?

A) books = new ArrayList( );
B) books = new ArrayList( );
C) books = new ArrayList( );
D) books = new Book( );
E) books = new Book( );
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
41
When declaring a two-dimensional array, we use two sets of square brackets.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
42
We can instantiate a two-dimensional array by assigning values when the array is declared.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
43
In a two-dimensional array, the number of elements in each row must be the same for every row.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
44
We cannot combine the declaration and instantiation of a multidimensional array.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
45
To process all the elements of a two-dimensional array, we use a double loop.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
46
We can pass a two-dimensional array parameter to a method.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
47
A method cannot return a two-dimensional array parameter.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
48
A two-dimensional array is an array of __________.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
49
When processing the elements of a two-dimensional array one row at a time, we should __________ the row processing variables before processing each row.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
50
An ArrayList automatically __________ its capacity as needed.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
51
If we want to store primitive data types in an ArrayList object, then we should use __________ classes.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
52
The ArrayList class uses generics; thus, the data type used is defined at a time the __________ class declares and instantiates an ArrayList object.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
53
The name of the method that enables us to append an element to the end of an ArrayList is __________.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
54
Identify how to instantiate a two-dimensional array by assigning initial values when the array is declared.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
55
Compare the function of the following two statements:
arrayName.length
arrayName[i].length
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
56
When processing all the elements of a column of a two-dimensional array, what possible runtime error do we have to worry about?
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
57
Simeon wants to keep track of his batting average for each day of each week of the next baseball season. Evaluate what is wrong with this code and recommend an alternative code.
double [ ] battingAverage;
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
58
Which keyword would you add to this code to instantiate the array, allocating memory for the array? Provide the updated code.
arrayName = datatype [exp1][exp2];
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
59
Theorize why the following code would generate compiler errors:
Auto [4][12] cars;
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
60
Theorize why the following code would generate compiler errors:
int [ ][ ] highTemps = new int [2][3];
highTemps = { { 89, 85, 98 },
{ 88, 90, 92 } };
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
61
A code written to analyze the average high temperatures in four cities for June, July, and August was set up so that the cities are the rows. Evaluate the results of this code:
avgHighTemps[2][0] = 75.2; // row 2
avgHighTemps[2][1] = 82.3;
avgHighTemps[2][2] = 78.5;
avgHighTemps[2][3] = 71.6;
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
62
Compare lines 22-23 with 27-28 and explain how the results will differ.
21 System.out.println( "\nUsing the enhanced for loop:" );
22 for ( Integer currentInteger : list )
23 System.out.print( currentInteger + "\t" );
24 System.out.println( );
25
26 System.out.println( "\nUsing unboxing and enhanced for loop:" );
27 for ( int currentInt : list ) // unboxing
28 System.out.print( currentInt + "\t" );
29 System.out.println( );
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 62 flashcards in this deck.