Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SparseArray remove() and delete() what's the difference?

What is the main difference between calling remove() or delete() on a SparseArray, because they both accept key's as arguments. Thanks.

like image 538
Moshe Rabaev Avatar asked Aug 16 '15 20:08

Moshe Rabaev


1 Answers

There is no difference. Quoting the documentation for remove():

Alias for delete(int).

In other words, they do the same thing. In the current implementation, remove() calls delete().

like image 73
CommonsWare Avatar answered Nov 11 '22 14:11

CommonsWare