File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Java can be quite a pain... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java can be quite a pain..." Watch "Java can be quite a pain..." New topic

Java can be quite a pain...

Clarence Kirby

Joined: Jun 18, 2002
Posts: 16
Do you realize that there is no queue class in Java? All there is, is a stack class which can be easily emulated by using a regular array. I was a little urked when I had to go and create my own queue class just to use for a simple java applet.
Just wondering though, since I only use java 1.1 (where I work requires it) I don't know if there in fact is a Queue class for later versions of Java. Anyone know?
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Well, there is not class NAMED Queue in the 1.4 API.
Perhaps it is lurking under a different name. What are the functions that you are looking for in it?
There is an EventQueue.
There is a JMS Queue Interface.
If you are looking to replace the System Event Queue you might try looking at Logger.
[ June 19, 2002: Message edited by: Cindy Glass ]

"JavaRanch, where the deer and the Certified play" - David O'Meara
John Dale
Ranch Hand

Joined: Feb 22, 2001
Posts: 399
What do you want from a queue? Add at one end and remove from the other? Look at List. However, this collections library doesn't come with 1.1, so if you have to work there and cannot get the standard collections or a third party library, you might just have to do it yourself, just as you would if you could not get libraries for some other language environment.
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
If you're stuck in 1.1 hell , you can always use Vector instead.

"I'm not back." - Bill Harding, Twister
I agree. Here's the link:
subject: Java can be quite a pain...
It's not a secret anymore!