Exam 9: Arrays
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of Java50 Questions
Exam 3: Introduction to Objects and Input/output50 Questions
Exam 4: Control Structures I: Selection50 Questions
Exam 5: Control Structures II: Repetition50 Questions
Exam 6: Graphical User Interface GUI and Object-Oriented Design OOD50 Questions
Exam 7: User-Defined Methods50 Questions
Exam 8: User-Defined Classes50 Questions
Exam 9: Arrays46 Questions
Exam 10: Inheritance and Polymorphism50 Questions
Exam 11: Handling Exceptions and Events50 Questions
Exam 12: Advanced Guis and Graphics48 Questions
Exam 13: Recursion50 Questions
Exam 14: Applications of Arrays Searching and Sorting and Strings50 Questions
Select questions type
Which method would you most likely use to find the location of an element in the vector?
Free
(Multiple Choice)
4.8/5
(38)
Correct Answer:
C
Given the following method heading public static void mystery(int list[], int size)and the declarationint[] alpha = new int[75];Which of the following is a valid call to the method mystery?
Free
(Multiple Choice)
4.8/5
(32)
Correct Answer:
C
The base address of an array is the memory location of the first array component.
Free
(True/False)
4.9/5
(33)
Correct Answer:
True
You can create an array of reference variables to manipulate objects.
(True/False)
4.9/5
(45)
double[] as = new double[7];
Double[] bs;bs = as;How many objects are present after the code fragment in the accompanying figure is executed?
(Multiple Choice)
4.8/5
(40)
Which method of the class vector would you use to remove an element at a specific location?
(Multiple Choice)
4.8/5
(43)
Given the method heading public static void strange(int a, int b)and the declarationint[] alpha = new int[20];
Int[] beta = new int[25];Which of the following is a valid call to the method strange?
(Multiple Choice)
4.9/5
(38)
char[][] table = new char[10][5];How many rows are in the array seen in the accompanying figure?
(Multiple Choice)
4.8/5
(37)
The statementint[] list = new int[15];creates list to be an array of 14 components because array index starts at 0.
(True/False)
4.8/5
(39)
Which of the following is the array subscripting operator in Java?
(Multiple Choice)
4.7/5
(38)
char[][] table = new char[10][5];What is the value of table[2].length?
(Multiple Choice)
4.9/5
(30)
When a boolean array object is instantiated, its components are initialized to false.
(True/False)
4.9/5
(31)
What does the following statement do?
Vector thisVector = new Vector();
(Multiple Choice)
4.7/5
(41)
Java stores two-dimensional arrays in a row order form in computer memory.
(True/False)
4.7/5
(43)
In a method call statement, when passing an array as an actual parameter, you use only its name.
(True/False)
4.9/5
(35)
Given the declarationdouble[] numList = new double[20];the statementnumList[12] = numList[5] + numList[7];updates the content of the thirteenth component of the array numList.
(True/False)
4.9/5
(39)
Consider the following method definition.public static int strange(int[] list, int listSize, int item)
{
Int count = 0;
For (int j = 0; j < listSize; j++)
(list[j]; == item)
Count++;
Return count;
}
Which of the following statements best describe the behavior of this method?
(Multiple Choice)
4.7/5
(43)
Showing 1 - 20 of 46
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)