Given a list of integer elements, how to get the max value and it\'s index in one shot. If there is more than one element with same max value, returning index of any one of
In java8 you can execute streams in parallel
Integer[] intArr= {1,2,6,2,234,3,54,6,4564,456}; IntStream.range(0, intArr.length-1).parallel(). reduce((a,b)->intArr[a] System.out.println("Index: " + ix + ", value: " + intArr[ix]));