示例3:計算LongStream中的不同元素。 // Java code for LongStreamcount()// tocountthe number of distinct// elements in given streamimportjava.util.*;importjava.util.stream.LongStream;classGFG{// Driver codepublicstaticvoidmain(String[] args){// creating a streamLongStream stream = LongStream....