gpt4 book ai didi

java - 为什么 java.util.List.clear() 是 "optional operation"?

转载 作者:搜寻专家 更新时间:2023-11-01 04:04:15 25 4
gpt4 key购买 nike

<分区>

根据Javadoc :

void clear()

Removes all of the elements from this list (optional operation). The list will be empty after this call returns.

为什么清除列表是可选操作?

这不会清除 RAM 以清除包含数千个对象的列表?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com