Why summaryStatistics() method on an empty IntStream returns max and min value of integer as the maximum and minimum int value present in the stream?
IntStream
Since the list is empty and those methods return an actual value and not an Optional it assumes the full Integer range. Otherwise it would return an empty Optional.
Optional