
Computer Programming 2 Final Review
Authored by Ryan Trujillo
Computers
9th - 12th Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following creates an int array of size 10?
int[10] myArray = new int[10];
int[] myArray = new int[10];
int[] myArray = { 10 };
int myArray[] = int[] * 10;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do I create an ArrayList to hold ints?
ArrayList<Integer> myArray = new ArrayList<Integer>();
int ArrayList myArray = new int ArrayList();
ArrayList<int> myArray = new ArrayList<int>();
ArrayList myArray = new ArrayList(Integer);
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do I add a String called myString to an ArrayList called myArray?
myArray[0] = myString;
myArray.add(myString);
myString.addTo(myArray);
myArray += myString;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code do?
int[] myArray = new int[10];
myArray[10] = 100;
Assigns the int 100 to position 10 in the array.
Throw an error
Resize the array from 10 to 100
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
I have an Integer ArrayList named myArray. I want to add the number 99 to my list, but I want to guarantee it will show up at the very front. How do I do this?
myArray.add(99);
myArray.add(1, 99);
myArray.add(0, 99);
myArray.front(99);
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If I have the following Strings contained in an ArrayList
"Dog"
"Cat"
"Bird"
What would the index of "Cat" be if I remove "Dog"?
0
1
2
3
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do I remove an object from an ArrayList myArray?
The object I want to remove is at index 0.
myArray.remove(0);
myArray.remove(myArray[0]);
myArray.delete(0);
myArray.get(0) = null;
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Microsoft Excel
Quiz
•
KG - Professional Dev...
20 questions
CSS 10 - QUIZ
Quiz
•
10th Grade
20 questions
Yr 11 ICT quiz 1 Networks & Security
Quiz
•
10th - 11th Grade
20 questions
CSS GRADE 9 - QUIZ PECs and EM
Quiz
•
9th Grade
20 questions
Teknologi dan Dampak Positif
Quiz
•
11th Grade
20 questions
Uji Pengetahuan Umum Microsoft Excel
Quiz
•
10th Grade
20 questions
การพัฒนาเว็บไซต์
Quiz
•
10th - 12th Grade
21 questions
Y9 Creative iMedia RO81 Quiz Part 1
Quiz
•
9th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade