Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
AP Computer Science A/Unit 7: ArrayList
Start Practice TestPractice Test
About Exam
medium Solved by 5 students

ArrayList String Concatenation

Mark
< Prev
Next >

What is printed as a result of executing the following code segment?

import java.util.ArrayList;
public class Test {
    public static void main(String[] args) {
       ArrayList list = new ArrayList();
       list.add(100);
       list.add("20");
       System.out.println(list.get(1) + 50);
    }
}
A

150

B

Compilation Error

C

10050

D

2050

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Total Time
Score
#1kaisuki11 0m 00s 100
#2demosolasis111 1m 27s 13
#3geethasailaja13 1m 17s 3
#4upadhgau00001 0m 00s -10
#5psak1201 1m 03s -73
#6bommasam00003 3m 13s -223
#7y.seong202713 5m 29s -249
#8singhris00012 14m 18s -768
Items per page:
10
1 – 8 of 8

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy|