logo
  • 教程列表
  • SO官方文档
  • 出列接口
    • 向 Deque 添加元素
    • 从 Deque 中删除元素
    • 无需删除即可检索元素
    • 通过 Deque 迭代
  1. StackOverflow 文档
  2. Java Language 教程
  3. 出列接口
  4. 从 Deque 中删除元素

从 Deque 中删除元素

Created: November-22, 2018

//Retrieves and removes the head of the queue represented by this deque
Object headItem = deque.remove();

//Retrieves and removes the first element of this deque.
Object firstItem = deque.removeFirst();

//Retrieves and removes the last element of this deque.
Object lastItem = deque.removeLast();
  • 无需删除即可检索元素
  • 向 Deque 添加元素

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明