0
10th Apr 2020, 8:49 AM
Sindhuja Selvakumar
Sindhuja Selvakumar - avatar
2 Answers
+ 1
Hi Sindhuja Selvakumar do not depend on the sololearn course alone for all explanations since these topics are not covered here. I would suggest you to go through some websites for a little advanced learning. The below thread will be useful. https://www.sololearn.com/discuss/580291/?ref=app Now coming back to your question. IntStream is an interface and you have initialized a reference variable stream which holds the value range from 1 to 2 because 3 is not included. It is somewhat similar to a for loop. In the next line you are using a forEach loop to print these values using the :: (method reference). So 1 and 2 are printed as output.
10th Apr 2020, 9:48 AM
Avinesh
Avinesh - avatar
0
Thanks
11th Apr 2020, 8:10 AM
Sindhuja Selvakumar
Sindhuja Selvakumar - avatar