What is printed as a result of executing the following code segment? List list 1 = 1
Fantastic news! We've Found the answer you've been seeking!
Question:
What is printed as a result of executing the following code segment?
List list1= new ArrayList();
list1.add("a");
list1.add("b");
list1.add(0,"c");
list1.add(1,"d");
list1.set(2,"e");
list1.add("f");
System.out.println(list1);
What is printed as a result of executing the following code segment?
a.[c, a, e, d, b, f]
b.[c, d, e, b]
c.[c, d, e, a, b, f]
d.[c, a, e, b, f]
e.[c, d, e, b, f]
Related Book For
Posted Date: