Java LinkedList previous next

前端 未结 3 1486
轮回少年
轮回少年 2021-01-02 08:46

is there anything similar to .Net\'s LinkedListNode<(Of <(T>)>)..::.Next and LinkedListNode<(Of <(T>)>)..::.Previous prop

3条回答
  •  暖寄归人
    2021-01-02 09:17

    You need to use a ListIterator you use that to traverse the List in either direction. The iterator contains methods such as previous() and next(). Check it out in the Javadocs.

    To get the ListIterator for your current list, call its listIterator(int index) method.

提交回复
热议问题