HARMAN Interview Question

oops, streams in java , design based