• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Java can be quite a pain...

 
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?
 
"The Hood"
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 ]
 
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.
 
Wanderer
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.
 
It's just like a fortune cookie, but instead of a cookie, it's pie. And we'll call it ... tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic