// To initialize the ArrayList with the same value for all of its elements // count is number of elements and element is the item value List arrList = new ArrayList(Collections.nCopies(count, element));
Last active
March 17, 2022 03:33
-
-
Save SaitejaP/072071d25ee0ebbc94ceb175b5383d55 to your computer and use it in GitHub Desktop.
Java tips and tricks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment