开发者

push_back() and push_front() in Java

Is there any collection class in java, that implements pus开发者_Python百科h_back() and push_front() methods?


The class java.util.LinkedList has addFirst/Last(), getFirst/last() and removeFirst/Last().


Any collection that implements Deque should have it (ArrayDeque, LinkedList)


The List appears to with both add functions.

https://docs.oracle.com/javase/1.5.0/docs/api/java/util/List.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜