Question: What will be the output of the following Java code? KWArrayList list = new KWArrayList (); list.add(14); list.add(27); list.add(38); list.add(1, 90); for(int i=0; i

What will be the output of the following Java code? KWArrayList list    

What will be the output of the following Java code? KWArrayList list = new KWArrayList (); list.add(14); list.add(27); list.add(38); list.add(1, 90); for(int i=0; i < list.size(); i++) System.out.print(list.get(i) + " "); list.set(3, 60); list.remove(1); System.out.println(); for(int i = list.size()-1; i >= list.size()/2; i--) System.out.print(list.get(i) + " ");

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 Programming Questions!