Day7: ------- 1.Userdefine List 2.LinkedList vs Vector 3.Set and types QUESTIONS(Theory) ------------------- 1.Describe the Collections type hierarchy. What are the main interfaces, and what are the differences between them? 2.Explain about user defined list? 3.what is the top most interface in collection 4.difference between collection & collections 5.What is encapsulaion? 6.Mention what is Linked List? 7.what is difference between set and List? 8.What is the difference between HashSet and TreeSet ? 9.Difference between Enumurator,Iterator and List Iterator 10.How to convert List into Set 11.How to remove the duplicates without converting set 12.What are the methods not supported in set? 13.What are classes available in set QUESTIONS: ----------- QUESTION 1.1: ------------ Description : Create a HashSet for the below values Input : List = 10,20,30,40,50,60,70,80,90,10,20 QUESTION 1.2: ------------ Description : Create a LinkedHashSet for the below values Input : List = 10,20,30,40,50,60,70,80,90,10,20 QUESTION 1.3: ------------ Description : Create a TreeSet for the below values Input : List = 10,20,30,40,50,60,70,80,90,10,20 QUESTION 2: ----------- QUESTION 2.1: ------------- Description : Convert the below list in to set(use addAll()) method Input : List = 10,20,30,90,10,10,40,50 QUESTION 2.2: ------------- Description : Convert the below list in to set(use addAll()) method Input : List = 105,205,305,405,505,605,705,805,505,605 QUESTION 2.3: -------------- Description : Convert the below list in to set(use addAll()) method Input : List = 100,200,300,400,500,600,700,100,300,500 QUESTION 3: ------------ QUESTION 3.1: -------------- Description : Get the each value of set by using enhanced for loop Input: List = 105,205,305,405,505,605,705,805 QUESTION 3.2: ------------- Description : Create a TreeSet and iterate each value in the set by using enhanced for loop Input : List = 10,20,30,40,50,60,70,80,90,10,20 QUESTION 3.3: ------------- Description : Create a HashSet and iterate each value in the set by using enhanced for loop Input : List = 10,20,30,40,50,60,70,80,90,10,20 QUESTION 4: ------------- QUESTION 4.1: -------------- Description : Create a new HashSet with values and return the common values Input : List = 10,20,30,90,10,10,40,50 Input : List = 30,40,50,60,80 QUESTION 4.2: -------------- Description : Create a new LinkedHashSet with values and return the common values Input : List = 10,20,30,90,10,10,40,50 Input : List = 10,20,60,50,40,70,80,90 QUESTION 4.3: -------------- Description : Create a new TreeSet with values and return the common values Input : List = 10,20,30,40,50,60,70,80 Input : List = 100,200,300,400,500,600,700,8000 QUESTION 5: ------------- QUESTION 5.1: -------------- Description : Create a new HashSet with values and perform removeAll() function Input : List = 10,20,30,90,10,10,40,50 Input : List = 30,40,50,60,80 QUESTION 5.2: -------------- Description : Create a new LinkedHashSet with values and perform removeAll() function Input : List = 10,20,30,90,10,10,40,50 Input : List = 10,20,60,50,40,70,80,90 QUESTION 5.3: -------------- Description : Create a new TreeSet with values and perform removeAll() function Input : List = 10,20,30,40,50,60,70,80 Input : List = 100,200,300,400,500,600,700,8000 QUESTION 6: ------------ Description: Create a userdefine Set and insert the 5 employee details Input : empId,name,phone,address,dob,doj,eMail,gender,Sal Output: Using scanner class insert 5 employee details