Created
January 21, 2019 19:37
-
-
Save companje/2df6d5e9a743639c0acb5f6b05616b33 to your computer and use it in GitHub Desktop.
ArrayDeque example / FIFO buffer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Queue; | |
import java.util.ArrayDeque; | |
Queue<String> q = new ArrayDeque(); | |
void setup() { | |
q.add("a"); | |
q.add("b"); | |
q.add("c"); | |
println(q.poll()); //a | |
println(q.poll()); //b | |
println(q.poll()); //c | |
} | |
void draw() { | |
stop(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment