Java Priority Queue

Опубликовано: 03 Май 2026
на канале: MoosesValley
971
14

Explore Java's built-in *PriorityQueue* class.

Create a *Task* list for tasks with various priorities and add them to a PriorityQueue and iterate through them and display them to the screen in order from highest priority to lowest priority.

Also switch how the priority works:

Initially low numbers = high priority.

However, I show a simple way to reverse this and make high numbers = high priority.


TODO / activities for students - see my Github link below.

Source code here on my Githib:
https://github.com/MooseValley/Queue-...


Moose's Software Valley - Established July, 1996.
https://rebrand.ly/MoosesSoftware