有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

收集方法是Java中的原子操作吗?

考虑下面的方法{{CD1}}:

addAll(Collection<? extends T> collection)
addAll(int i, Collection<? extends T> collection)
removeAll(Collection<?> collection)
retainAll(Collection<?> collection)

我想知道这些方法是否真的是原子操作

Atomic implies indivisibility and irreducibility, so an atomic operation must be performed entirely or not performed at all.


共 (0) 个答案