Question 23
Consider the Java code given below.
import java.util.*;public class SetTest { public static void main(String[] args) { var list = new LinkedList<String>(); list.add("Modern"); list.add("Application"); list.add("Development"); list.add("Development"); //CODE BLOCK for(String str:list) { set1.add(str); set2.add(str); } for(String str:set1) System.out.print(str+" "); System.out.println(); for(String str:set2) System.out.print(str+" "); }}Choose the correct option(s) to be filled in place of CODE BLOCK so that the program always generates the following output:
Application Development Modern
Modern Application Development