When to use SparseArray vs HashMap ?
When to use SparseArray vs HashMap ?
Here is a concise answer to the Android interview question "When to use SparseArray vs HashMap?":
Use SparseArray when:
SparseArray is more memory efficient than HashMap for storing integer keys because it avoids the overhead of Integer wrapper objects. It's a good choice when you have a limited set of integer keys.
Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.