ArrayList String Concatenation
What will be printed when the above program is executed?
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
10050
B
Compilation Error
C
150
D
2050
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | kaisuki | 1 | 1 | 0m 00s | 100 |
| #2 | geethasailaja | 1 | 3 | 1m 17s | 3 |
| #3 | upadhgau000 | 0 | 1 | 0m 00s | -10 |
| #4 | psak12 | 0 | 1 | 1m 03s | -73 |
| #5 | y.seong2027 | 1 | 3 | 5m 29s | -249 |
| #6 | singhris000 | 1 | 2 | 14m 18s | -768 |
APFIVE