Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java can be quite a pain...

 
Clarence Kirby
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
John Dale
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're stuck in 1.1 hell , you can always use Vector instead.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic