Skip to content

Type error in section about BiPredicates #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Locust1 opened this issue Apr 6, 2025 · 1 comment
Closed

Type error in section about BiPredicates #151

Locust1 opened this issue Apr 6, 2025 · 1 comment

Comments

@Locust1
Copy link

Locust1 commented Apr 6, 2025

https://dev.java/learn/lambdas/functional-interfaces/#predicate

Code snippets in section called "Testing Two Elements with a BiPredicate" appears to be wrong and doesn't compile:
Predicate<String, Integer> isOfLength = (word, length) -> word.length() == length;

The type of the isOfLength variable should be BiPredicate<String, Integer>

@JosePaumard
Copy link
Contributor

Thank you for your report! I just pushed a fix for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants