How to compose predicates together

Report a typo

Two predicates are given:

Predicate<Character> isLetter = Character::isLetter;

Predicate<Character> isUpperCase = Character::isUpperCase;

Predicate<Character> predicate = ... // the composed predicate

How to compose them together so that the predicate returns the following results?

predicate.test('1'); // false
predicate.test('3'); // false
predicate.test('c'); // true
predicate.test('D'); // false
predicate.test('e'); // true
predicate.test('Q'); // false
Select one option from the list
___

Create a free account to access the full topic