
C4 Week 9 Wednesday
Authored by Ahmetcan türk
Other
Professional Development
Used 14+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Declare and construct an ArrayList with an initial capacity of 20 references to Object.
Object list(20) = new ArrayList() ;
ArrayList list[20] = new ArrayList() ;
ArrayList[Object] list = new ArrayList(20) ;
ArrayList<Object> list = new ArrayList<Object>(20) ;
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Examine the following code:
ArrayList<String> list = new ArrayList<String>(10) ;
list.add( "Ann" );
list.add( "Bob" );
list.add( "Eve" );
After the code has executed, what is the capacity of list? What is its size?
3, 3
3, 10
10, 3
10, 10
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Examine the following code:
ArrayList<String> list = new ArrayList<String>(10) ;
list.add( "Andy" );
list.add( "Bart" );
list.add( "Carl" );
list.add( 0, "Eve" );
What element will be at index 2 of the list?
Eve
Andy
Bart
carl
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Examine the following code:
ArrayList<String> list = new ArrayList<String>() ;
list.add( "Andy" );
list.add( "Bart" );
list.add( "Carl" );
list.add( "Doug" );
list.add( "Elmo" );
Which of the following will replace the element "Carl" with "Zoltan" ?
list[2] = "Zoltan" ;
list.set( "Zoltan", "Carl" );
list.add( "Zoltan", list.indexOf("Carl") );
list.set( list.indexOf("Carl"), "Zoltan" );
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Examine the following code:
ArrayList<String> list = new ArrayList<String>() ;
list.add( "Andy" );
list.add( "Bart" );
list.add( "Carl" );
list.add( "Doug" );
list.add( "Elmo" );
Which of the following will change the list so that it looks like:
Andy
Bart
Carl
Doug
Oscar
Elmo
list.add( 3, "Oscar" ) ;
list.add( 4, "Oscar" ) ;
list.set( 3, "Oscar" ) ;
list.set( 4, "Oscar" ) ;
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Examine the following code:
ArrayList<String> list = new ArrayList<String>() ;
list.add( "Andy" );
list.add( "Bart" );
list.add( "Carl" );
list.add( "Doug" );
list.add( "Elmo" );
Which of the following will change the list so that it looks like:
Andy
Bart
Doug
Elmo
list.remove( 3 );
list.remove( 2 );
list.add( 2, null );
list.set( list.indexOf( "Carl" ), "Doug" );
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Examine the following code:
ArrayList<String> list = new ArrayList<String>() ;
list.add( "Andy" );
list.add( "Bart" );
list.add( "Carl" );
list.add( "Doug" );
list.add( "Elmo" );
Which of the following will change the list so that it looks like:
Andy
Bart
Carl
Doug
list.remove( list.size() );
list.remove( list.size()-1 );
list.remove( 5 );
list.clear( "Elmo" );
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
15 questions
Agency OBX -Day 1 Quiz
Quiz
•
Professional Development
10 questions
Transport quz
Quiz
•
Professional Development
15 questions
REV CODE
Quiz
•
Professional Development
15 questions
QUIZ NSC 26 Juli 2023
Quiz
•
Professional Development
10 questions
Rakor Komite Audit dan Internal Audit Grup MIND ID S.1 2024
Quiz
•
Professional Development
10 questions
Supply_PKT-2_September'23
Quiz
•
Professional Development
16 questions
NTTP Final TAG quiz
Quiz
•
Professional Development
10 questions
All About MS Teams
Quiz
•
Professional Development
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Other
44 questions
Would you rather...
Quiz
•
Professional Development
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
12 questions
Mardi Gras Trivia
Quiz
•
Professional Development
14 questions
Valentine's Day Trivia!
Quiz
•
Professional Development
7 questions
Copy of G5_U5_L14_22-23
Lesson
•
KG - Professional Dev...
16 questions
Parallel, Perpendicular, and Intersecting Lines
Quiz
•
KG - Professional Dev...
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
12 questions
Valentines Day Trivia
Quiz
•
Professional Development