Home > Back-end > Delete an element array and ArrayList, what method overhead is small?
Delete an element array and ArrayList, what method overhead is small?
Time:01-27
In writing a more logical, want to delete an array or ArrayList elements has been compared, although don't know much about deleting the underlying implementation (such as displacement element), but know delete itself is overhead, if cost is larger than don't delete action
CodePudding user response:
ArrayList bottom is an array, if you need to do more complex operations, such as what you said is deleted overhead problem, you can use the ArrayList, you may not believe me, but you can not believe that Doug Lea, hope my answer will be helpful to you!