Question: solve it 2. list1 is an arraylist which stores String information. What will be the output of the following code segment? list1.add(Anaya); listi.add(Layla); list1.add(Sharrie); listl.set(0,

solve it
solve it 2. list1 is an arraylist which stores String information. What

2. list1 is an arraylist which stores String information. What will be the output of the following code segment? list1.add("Anaya"); listi.add("Layla"); list1.add("Sharrie"); listl.set(0, "Destini"); listi.add(0, "Sarah"); System.out.println(listi); a) ["Sarah", "Destini", "Layla", "Sharrie") b) ["Sarah", "Destini", "Anaya", "Layla", "Sharrie"] c) O ("Destini", "Layla", "Sharrie", "Sarah") d). ["Sarah", "Layla", "Sharrie") Leave blank

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!