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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!