📄 e342. implementing a queue.txt
字号:
LinkedList queue = new LinkedList();
// Add to end of queue
queue.add(object);
// Get head of queue
Object o = queue.removeFirst();
// If the queue is to be used by multiple threads,
// the queue must be wrapped with code to synchronize the methods
queue = (LinkedList)Collections.synchronizedList(queue);
Related Examples
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -