Maybe the example is old(ish) was referring to a Queue class written before the Java API contained such an interface? Another giveaway that this might be old is that the modern Queue interface takes a type parameter, which isn't in your example.
To work with a Queue nowadays, anyway, you'd need to create an instance of some class that implements Queue, like LinkedList. So
That's down to Generics, or rather lack thereof. Have a look at this tutorial if you would like to know more about that subject. For now though, realize that it's a warning, not an error, and you could ignore it if you so choose. The -Xlint suggestion you can safely ignore for now. This javac option will enable all compiler warnings. If you want to know more about javac and its options, have a look here.
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.