EricWang's Blog
    • Posts
    • Algorithm&DataStructure
      • 排序方法总结
      • 最小生成树
      • 红黑树
    • BigData
      • 大数据组件
    • Database
      • 1 Introduction
      • Relation Database
      • SQL
    • Java
      • Java基础语法
      • Java集合框架
      • Java面试问题
    • Linux
      • Part 1
      • Part 2
    • ML
      • AndrewNG-CV基础
      • AndrewNG-DL基础
      • AndrewNG-DL应用
      • AndrewNG-GAN基础
      • 李宏毅-机器学习2021春-1
      • 李宏毅-机器学习2021春-2
      • 李宏毅-机器学习2021春-3
      • 李宏毅-机器学习2021春-4
      • 李宏毅-机器学习2021春-5
      • 李宏毅-机器学习2021春-6
    • OS
      • 知识梳理 1
      • 知识梳理 2
    • SDN
      • SDN 1
    Hero Image
    Java集合框架

    Java集合框架 参考:https://docs.oracle.com/javase/8/docs/api/index.html 1 继承关系图 2 常用函数总结 栈和队列 栈的两种实现形式 Deque<Integer> queue = new LinkedList<Integer>(); // 推荐 Stack<Integer> queue2 = new Stack<Integer>(); E push(E item) java.util.Stack中,加入尾部 java.util.LinkedList中(接口Deque中规定),加入头部 boolean add(E e) 加入尾部,两种方法均可使用,java.util.Collection中规定 E pop() java.util.Stack中,弹出尾部 java.util.LinkedList中(接口Deque中规定),弹出头部 E get(int index) 由于Deque接口中没有get方法(Deque继承自Queue),故使用LinkedList时无法用get 而Stack继承自Vector->List,故使用Stack时可以用get E poll() java.util.LinkedList中(接口Deque中规定),弹出头部,同pop java.util.Stack中无法使用 E peek() java.

    July 27, 2021 Read
    Hero Image

    January 1, 0001 Read
    Hero Image

    January 1, 0001 Read
    • ««
    • «
    • 1
    • 2
    • 3
    • »
    • »»
    Navigation
    • Projects
    • Recent Posts
    Contact me:
    • Email: 2018211947@bupt.edu.cn

    Stay up to date with email notification

    By entering your email address, you agree to receive the newsletter of this website.

    Toha Theme Logo Toha
    © 2022 Copyright.
    Powered by Hugo Logo