What will be the output of the following program? import jav…
What will be the output of the following program? import java.util.*; public class Test { public static void main(String[] args) { Set set = new LinkedHashSet(); set.add(“Banana”); set.add(“Apple”); set.add(“Cherry”); System.out.println(set); } }
Read DetailsWhat will be the output of the following program? import jav…
What will be the output of the following program? import java.util.*; public class Test { public static void main(String[] args) { LinkedList list = new LinkedList(Arrays.asList(1, 2, 3, 4, 5)); list.clear(); System.out.println(list.isEmpty()); } }
Read Details