Advertisement
Guest User

Untitled

a guest
May 25th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. val queue = CircularFifoQueue<String>(5)
  2. queue.add("a")
  3. queue.add("b")
  4. queue.add("c")
  5. queue.add("d")
  6. queue.add("e")
  7. queue.add("f")
  8. queue.add("g")
  9. queue.add("h")
  10. queue.add("i")
  11.  
  12. for (item in queue) {
  13. System.out.println(item)
  14. }
  15.  
  16. // Output:
  17. // e
  18. // f
  19. // g
  20. // h
  21. // i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement