ArrayList String Concatenation
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
10050
C
2050
D
Compilation Error
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | kaisuki | 1 | 1 | 0m 00s | 100 |
| #2 | demosolasis1 | 1 | 1 | 1m 27s | 13 |
| #3 | geethasailaja | 1 | 3 | 1m 17s | 3 |
| #4 | upadhgau000 | 0 | 1 | 0m 00s | -10 |
| #5 | psak12 | 0 | 1 | 1m 03s | -73 |
| #6 | bommasam000 | 0 | 3 | 3m 13s | -223 |
| #7 | y.seong2027 | 1 | 3 | 5m 29s | -249 |
| #8 | singhris000 | 1 | 2 | 14m 18s | -768 |
Items per page:
10
1 – 8 of 8
APFIVE