Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 SparseArray 上调用 remove() 或 delete() 的主要区别是什么,因为它们都接受键作为参数。谢谢。
没有区别。引用文档remove():
remove()
delete(int) 的别名。
换句话说,他们做同样的事情。在当前的实现中,remove()调用delete().
delete()