Question: Task 2: Write a java program to iterate through all elements in the TreeSet using iterators and print them. Task 3: Write a program to
Task 2: Write a java program to iterate through all elements in the TreeSet using iterators and print them.
Task 3: Write a program to perform the following task: 1. Print the set in descending order 2. Print the elements greater than and less than the given element. (use a dynamic approach. Sample input: 200) 3. find the class to which the given list belongs. 4. Find the subset within the given range.(use a dynamic approach. Sample input: 200 - 700)
Task 4: Explain the features of TreeSet
Task 5: For the given data set depict the TreeSet traversal. (Note: For Task 5, perform the traversal in a sheet and upload the image of it)
Input List of data: 100, 50, 125, 175, 45, 225, 500, 25, 75, 15, 150, 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
