• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Queue,please help

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to use Queue.. but may I don't know the correct method to use it , I work in JB9 , I read that it is in
java.util.object; and try to define a refernce to it like this :
Queue queue;
it didn't work ,
Note: I don't want use the queue that use in jms => java.jms.Queue;
I wish to take a benifit...
thanks.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Lola!
There is no such thing as java.util.object.
Also, in the J2SE API, there is no class or interface named Queue. And there is no class or interface named java.jms.Queue anywhere, I'm pretty sure.
As part of the J2EE API there does exist an interface javax.jms.Queue. To be able to make use of it, you'll want to have downloaded, installed, and properly configured your system to make use of Sun's J2EE SDK. Or perhaps the edition of JBuilder 9 that you are using already has the APIs at hand, and you just need to specify the correct fully-qualified interface in your import statement.
 
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is an implementation of a queue (and stack) which is kind of hidden.
Check out java.util.LinkedList
http://java.sun.com/j2se/1.4.2/docs/api/java/util/LinkedList.html
You can use it for queue behaviour with methods:
- addLast() & removeFirst()
 
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic