There is a new method setAll in the java.util.Arrays class that will perform a bulk assignment of every element of an array. For example, the following code:
String[] array = … ; Arrays.setAll(array, String::valueOf);
will set each element of a String array to the string representation of the element’s index.
There are also […]