What is the output?
CS 3 Midterm 2023

Quiz
•
Computers
•
12th Grade
•
Medium
Danielle Mills
Used 8+ times
FREE Resource
33 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
[two, five]
[two, four]
[two, three]
[four, five]
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is a correct declaration and initialization of an ArrayList of String values?
ArrayList <String> name;
name = new ArrayList<String>();
String name; name = new String<ArrayList>();
ArrayList <String> name; name = ArrayList<String>();
ArrayList name; name = new ArrayList<String>();
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the nums ArrayList with the values [5, 4, 3, 2], what statement below removes the value 3 from the list?
nums.remove(1)
nums.get(2) = null
nums.remove(2)
nums.remove(3)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the ArrayList nums with the values [3, 7, 6, 0], what code below is the proper way to change the 7 to be a 5?
nums.set(7, 5)
nums.set(7, 5)
nums[2] = 5
nums.set(1, 5)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What index value is used to locate the last element in the nums ArrayList?
nums.length
nums.size()-1
nums.size()
nums.length()-1
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The ArrayList class ____ method returns the current ArrayList size.
length
size
capacity
rows
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output?
15
5
9
11
7
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
String

Quiz
•
10th Grade - University
34 questions
Java Quiz

Quiz
•
11th Grade - University
35 questions
SKT5 : Bab 3 : c) Standard Library, Subaturcara, Tatasusunan

Quiz
•
10th - 12th Grade
35 questions
JavaScript&DOM

Quiz
•
12th Grade
30 questions
JavaScript Arrays

Quiz
•
10th - 12th Grade
34 questions
AP CS A: Arrays, Array Lists, Recursion & Searching/Sorting

Quiz
•
9th - 12th Grade
28 questions
Python List

Quiz
•
12th Grade
32 questions
2.2 Programming Fundamentals Knowledge Check

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade