Java SE 8 Programmer I (1Z0-808)
© examsiri.com
Question : 5 of 8
Marks:
+1,
-0
Given the code fragment:
What is the result?
public class TestClass {
 public static void main(String[] args) {
  List items = new ArrayList<>();
  items.add("Pen");
  items.add("Pencil");
  items.add("Box");
  for (String i : items) {
   if (i.indexOf("P") == 0) {
    continue;
   } else {
     System.out.print(i+" ");
   }
  }
 }
} What is the result?
Go to Question: