• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Meaning of FIFO behaviour

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
 
fred rosenberger
lowercase baba
Bartender
Posts: 12186
34
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic