Skip to content
sneppets

sneppets

  • Privacy
sneppets-java8

Check if Element exists in a Collection using Lambda Expressions

January 29, 2020February 12, 2020 Editorial StaffLeave a Comment on Check if Element exists in a Collection using Lambda Expressions

If you wanted to check whether element exists in a collection or not using specific id or name, the better approach is to use anyMatch() method of Stream interface of Lambda Expressions.

Java java, java-8, lambda
Copyright © 2018 Sneppets. All Rights Reserved