Exam 7: Arrays and Array Lists
Exam 1: Introduction76 Questions
Exam 2: Using Objects82 Questions
Exam 3: Implementing Classes108 Questions
Exam 4: Fundamental Data Types124 Questions
Exam 5: Decisions119 Questions
Exam 6: Loops107 Questions
Exam 7: Arrays and Array Lists117 Questions
Exam 8: Designing Classes88 Questions
Exam 9: Inheritance99 Questions
Exam 10: Interfaces100 Questions
Exam 11: Input/Output and Exception Handling108 Questions
Exam 12: Object-Oriented Design104 Questions
Exam 13: Recursion99 Questions
Exam 14: Sorting and Searching100 Questions
Exam 15: The Java Collections Framework102 Questions
Exam 16: Basic Data Structures102 Questions
Exam 17: Tree Structures102 Questions
Exam 18: Generic Classes75 Questions
Exam 19: Stream Processing85 Questions
Exam 20: Graphical User Interfaces75 Questions
Exam 21: Advanced Input/Output90 Questions
Exam 22: Multithreading81 Questions
Exam 23: Internet Networking74 Questions
Exam 24: Relational Databases75 Questions
Exam 25: XML74 Questions
Select questions type
The method findLargest should return the largest of any number of double values.For example, the call findLargest (3.4, -2.6, 2.9) should return 3.4 and the call findLargest (9.2, 17.6, 3.4, -2.6, 2.9) should return 17.6.Partial code to do this is given below:
What code will complete this method?

(Multiple Choice)
5.0/5
(39)
Which code snippet calculates the sum of all the even elements in an array values?
(Multiple Choice)
4.7/5
(43)
Consider the following 2-dimensional array.Which expression gives the number of elements in the third row?

(Multiple Choice)
4.8/5
(34)
Consider the following code snippet:
What is the output of the given code snippet on execution?

(Multiple Choice)
4.9/5
(35)
Which one of the following code snippets accepts the integer input in an array list named num1 and stores the even integers of num1 in another array list named evennum?
(Multiple Choice)
4.7/5
(40)
Select the statement that reveals the logic error in the following method.

(Multiple Choice)
4.9/5
(35)
Which code snippet finds the largest value in an array that is only partially full?
(Multiple Choice)
4.9/5
(28)
Suppose you wish to write a method that returns the sum of the elements in partially filled array.Which is the best choice for a method header?
(Multiple Choice)
4.9/5
(34)
Which one of the following is a correct declaration for a method named passAList that has as arguments an array list myList of size 10 and an integer array intArr of size 20, and that modifies the contents of myList and intArr?
(Multiple Choice)
4.8/5
(34)
When a Java program terminates and reports an exception, the error message contains which pieces of useful information?
I.the compile and revision control history of the source code changes that caused the error
II.the name of the exception that occurred
III.the stack trace
(Multiple Choice)
4.9/5
(44)
Consider the following code snippet, where the array lists contain elements that are stored in ascending order:
Which one of the following descriptions is correct for the given code snippet?

(Multiple Choice)
4.8/5
(31)
If currLength is an integer variable that gives the number of elements currently in the array myArray, which code snippet prints out the elements in the partially filled array of integers?
(Multiple Choice)
4.8/5
(45)
What is the result of the following definition of an array list?
ArrayList<Double> points;
(Multiple Choice)
4.8/5
(41)
Consider the following code snippet:
What is the size of the array list somedata after the given code snippet is executed?

(Multiple Choice)
4.8/5
(31)
Showing 61 - 80 of 117
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)