how to delete the last element of a collection without iterating it?
how to delete the last element of a collection without iterating it?
Collapse
X
-
Tags: None
-
If you know the object you can use remove(Object o) and pass the object to remove, otherwise, from the docs you can change the Iterator to an array first with the toArray method and remove the last object in the array.Originally posted by shiniskumarhow to delete the last element of a collection without iterating it?
Comment