reduce example in java 8 stream Example: java reduce array Arrays.stream(array).reduce((str1, str2) -> str1 + str2);