With an ArrayList I would do something like
myList.set(myList.indexOf(oldItemNumber), newItemNumber);
Is there an easy way to achieve this for LinkedHashSet?
Just use the put()
method. It will update that specific entry.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With