Exam 8: Arrays and the Arraylist Class
Exam 1: Introduction to Computers and Java42 Questions
Exam 2: Java Fundamentals53 Questions
Exam 3: Decision Structures52 Questions
Exam 4: Loops and Files48 Questions
Exam 5: Methods50 Questions
Exam 6: A First Look at Classes49 Questions
Exam 7: A First Look at Gui Applications49 Questions
Exam 8: Arrays and the Arraylist Class52 Questions
Exam 9: A Second Look at Classes and Objects40 Questions
Exam 10: Text Processing and More About Wrapper Classes49 Questions
Exam 11: Inheritance49 Questions
Exam 12: Exceptions and Advanced File Io46 Questions
Exam 13: Advanced Gui Applications46 Questions
Exam 14: Applets and More39 Questions
Exam 15: Recursion34 Questions
Exam 16: Sorting, Searching, and Algorithm Analysis46 Questions
Exam 17: Generics50 Questions
Exam 18: Collections50 Questions
Exam 19: Array-Based Lists20 Questions
Exam 20: Linked Lists36 Questions
Exam 21: Stacks and Queues36 Questions
Exam 22: Binary Trees, Avl Trees, and Priority Queues45 Questions
Select questions type
Any items typed on the command-line,separated by space,after the name of the class are considered to be one or more arguments that are to be passed into the main method.
(True/False)
4.8/5
(35)
What would be the results of the following code? int[] array1 = new int[25];
… // Code that will put values in array1
Int value = array1[0];
For (int a = 1;a < array1.length;a++)
{
If (array1[a] < value)
Value = array1[a];
}
(Multiple Choice)
4.9/5
(45)
If numbers is a two-dimensional int array that has been initialized and total is an int that has been set to 0,which of the following will sum all the elements in the array?
(Multiple Choice)
4.9/5
(30)
What does the following statement do? double[] array1 = new double[10];
(Multiple Choice)
4.8/5
(46)
What would be the results after the following code was executed? int[] x = {23,55,83,19};
Int[] y = {36,78,12,24};
X = y;
Y = x;
(Multiple Choice)
4.9/5
(40)
What would be the results of the following code? final int SIZE = 25;
Int[] array1 = new int[SIZE];
… // Code that will put values in array1
Int value = 0;
For (int a = 0;a < array1.length;a++)
{
Value += array1[a];
}
(Multiple Choice)
4.9/5
(38)
An ArrayList object automatically expands in size to accommodate the items stored in it.
(True/False)
4.8/5
(43)
The following statement creates an ArrayList object.What is the purpose of the < String > notation? ArrayList< String > arr = new ArrayList< String >();
(Multiple Choice)
4.7/5
(32)
Which of the following is a valid declaration for a ragged array?
(Multiple Choice)
5.0/5
(39)
What will be the value of x[8] after the following code has been executed? final int SUB = 12;
Int[] x = new int[SUB];
Int y = 100;
For(int i = 0;i < SUB;i++)
{
X[i] = y;
Y += 10;
}
(Multiple Choice)
4.8/5
(32)
To compare the contents of two arrays,you must compare the elements of the two arrays.
(True/False)
4.9/5
(42)
You use this method to determine the number of items stored in an ArrayList object.
(Multiple Choice)
4.7/5
(35)
Which of the following is a correct method header for receiving a two-dimensional array as an argument?
(Multiple Choice)
4.9/5
(49)
Java limits the number of dimensions that an array may have to 15.
(True/False)
4.8/5
(43)
What would be the results of the following code? int[] x = { 55,33,88,22,99,
11,44,66,77 };
Int a = 10;
If(x[2] > x[5])
A = 5;
Else
A = 8;
(Multiple Choice)
5.0/5
(46)
How many rows and how many columns are in the points array,declared here: int [][] points = new int[10][20];
(Multiple Choice)
4.9/5
(35)
If a[] and b[] are two integer arrays,the expression a == b compares the array contents.
(True/False)
4.9/5
(37)
To return an array of long values from a method,use this as the return type for the method.
(Multiple Choice)
4.9/5
(38)
Showing 21 - 40 of 52
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)