Working Java Example for Standard Queues