Core Java| JSP| Servlets| XML| EJB| JEE5| Web Services| J2ME| Glossary| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
Java Queue 
 

A queue is a collection interface that holds the objects.

 

Java Queue

                         

A queue is a collection interface that holds the objects. collections are designed to hold elements prior to processing. Queues provide additional insertion, extraction, and inspection operations along with the collection operations.

Mostly but not necessarily queues, order elements in a FIFO (first-in-first-out) manner. It is independent of the order used, while the head of the queue is that element which would be removed by a call to remove() or poll(). In case of FIFO queue, elements are inserted from the tail of the queue. While different queues may use different placement rules. Every Queue implementation must specify its ordering properties.

The offer() method inserts an element if possible, otherwise returning false that is designed for normal failures rather than exceptional occurrences such as fixed capacity (or bounded) queue. Methods remove() and poll() are used to remove the element that returns the head of the queue. Methods remove() and poll() are different only in that remove() method throws an exception whenever the queue is empty, while the method poll() returns null.

Methods element() and peek() returns rather than removing the head of the queue.

To know more about java queue go to the link:  

http:/www.roseindia.net/java/example/java/util/QueueImplement.shtml 

 

                         

» View all related tutorials
Related Tags: c interface object io objects queue collection int ld e ce in nt j ace obj s col at old

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.