Check out example codes for "java 8 findany on null list". It will help you in understanding the concepts better.

Code Example 1

listContries.stream()
            .filter(country -> country.getNoCountry()
            .equals(CountryFinal))
            .findAny().map(Country::getCoCountry).orElse(WHATEVER_YOU_WANT);

Learn ReactJs, React Native from akashmittal.com