Question: PredicateMethodsGeneric ( 2 0 ) Modify PredicateMethods from Programs / Lesson 1 3 / Classwork to make the type generic. Call it PredicateMethodsGeneric. Add a

PredicateMethodsGeneric (20)
Modify PredicateMethods from Programs/Lesson 13/Classwork to make the type generic. Call it PredicateMethodsGeneric.
Add a Predicate p3 of type String that tests if the first character of a String is H. Then test with a String where the first character is H, and one where it isnt.
Sample Output:
The Predicate is false for 4
The Predicate is true for 4
The Predicate is true for 5
The Predicate is false for 5
2
The Predicate is false for 6
The Predicate is true for 6
The Predicate is true for Hello
The Predicate is false for Goodbye

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!