Question
Question 1 Write a method first() that creates two priority queues, {Pineapple, Pear, Quamquat, Grape, Dragon Fruit, Boysenberries} and {Pineapple, Cantaloupe, Dragon Fruit, Blueberries, Pomegrante}
Question 1
Write a method first() that creates two priority queues, {"Pineapple", "Pear", "Quamquat", "Grape", "Dragon Fruit", "Boysenberries"} and {"Pineapple", "Cantaloupe", "Dragon Fruit", "Blueberries", "Pomegrante"}. Add to the first list a green skin fruit. Add your favorite fruit to the second list. Display their union, difference, and intersection. Note that priority queue can have duplicates. The union of two prority queues may have duplicates.
Question 2
Create a method Second(), that modifies the first(), to print the list of fruits beginning with letter b.
Question 3
Write a method third(), that creates two linked hash sets, {53, 42, 65, 91, 87, 65} and {65, 93, 42, 67, 87}. Add your birthday day, to the first list. Add a number between 12 and 40 to the second list. Display their union, difference, and intersection.
Upload java source code named your Lastname.java (ex. Samplewala.java) and the run/result, fir the above 3 sub modules.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started