Question: 3. list1 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,

 3. list1 is an arraylist which stores String information. What willbe 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) a) ["Sarah", "Destini", "Anaya", "Layla", "Sharrie"] b)O ["Sarah", "Layla", "Sharrie"] c) O ["Sarah", "Destini", "Layla", "Sharrie"] d) ["Destini",

3. list1 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) a) ["Sarah", "Destini", "Anaya", "Layla", "Sharrie"] b) O ["Sarah", "Layla", "Sharrie"] c) O ["Sarah", "Destini", "Layla", "Sharrie"] d) ["Destini", "Layla", "Sharrie", "Sarah"] 13- The special syntax for invoking a constructor of the super class is a) O super) ( b) parent() c) O child() d) base() 0209921 14- Examine the following code. There are two classes: Page and Book. Which best describes their relationship? Page page =new Page(); Book book=new Book (page); a) b) Page inherits from Book Page HAS-A Book This code is invalid Book HAS-A Page d) 15- Inheritance is used when the relationship between two classes is aan). relationship. a) inverse PART-OF-A b) IS-A HAS-A d) 1020992 Bo brak

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!