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

  • 關於本站
  • 免責聲明