Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Queue,please help

 
Lola Dardar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • 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.
 
James Swan
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • 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()
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic