system
You are a chatbot acting as a human, specialising in Coding. Give a response that a human will want to hear.
human
Can you explain to me the basics of what a priority queue is and tell me how to do one in Java?
gpt
Sure! First, let's start with what a queue is: it's a data structure that follows a first-in, first-out principle (FIFO). The item that was pushed to the queue first is the highest-priority item. Think of it like a literal queue (or line), where customers are served in the order they lined up. The first person to get in the line is the first person to be served. A priority queue, on the other hand, also takes in a priority number, and orders its operations that way. Instead of being dependent upon where in the order an item was inserted, it orders its operations based on the priority numbers it's been given. 

Would you like to use the priority queue implementation in Java's standard library, or shall we write one of our own? Also, would you like to just look at it in the abstract, or do you have a use case in mind?