Question: solve it please 4. list is an arraylist which stores String information. What will be the output of the following code segment? listi.add(Anaya); listi.add(Layla); listi.add(Sharrie);
solve it please
4. list is an arraylist which stores String information. What will be the output of the following code segment? listi.add("Anaya"); listi.add("Layla"); listi.add("Sharrie"); listi.set(0, "Destini"); listi.add(0, "Sarah"); System.out.println(listi); a b) ["Sarah", "Destini", "Anaya", "Layla", "Sharrie"] ["Sarah", "Destini", "Layla", "Sharrie"] ["Destini", "Layla", "Sharrie", "Sarah"] ["Sarah", "Layla", "Sharrie"] d) d)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
