This is the simplest and complete solution for your if you want to check if ArrayList contains specific value such as String, Integer, Long or Double. With the combination of Java7 and Java8 - …
Java8 Stream Archives...
Java8 Stream API provides list of Aggregate operations − Stream supports filter, map, limit, reduce, find, match, and so on with the help of collect() method and more…