check if all values are same in list java

Solutions on MaxInterview for check if all values are same in list java by the best coders in the world

showing results for - "check if all values are same in list java"
Matteo
20 Sep 2019
1boolean allEqual = list.stream().distinct().limit(2).count() <= 1
2