File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Meaning of FIFO behaviour Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Meaning of FIFO behaviour " Watch "Meaning of FIFO behaviour " New topic
Author

Meaning of FIFO behaviour

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

I am reading about what Collection class to use when we want FIFO behaviour .

Please tell me what does it mean by FIFO behaviour . I think when we add elements to a COntainer (DataStructures)


For example say :


please let me know what is the First in here , whether it will be One or Three in this case ??

Thanks i advance .


Save India From Corruption - Anna Hazare.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 10911
    
  12

FIFO means "First In, First Out". It's like a queue or a line at Starbucks. since "ONE" was the first thing you put it, it is at the beginning.

LIFO means "Last In, First Out". this is like a stack of plates. the last item you put on it is on top, and will be the first one to come out.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thank you very much.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Meaning of FIFO behaviour
 
Similar Threads
why backward access is faster when compared to forward looping
Generics - need help
What is the use of this New Enhanced for loop feature ??
Collections - the meaning of ORDERED
Hello a collection problem