Question: I need help figuring this out in java: Write a generic method to count the number of elements in a collection that have a specific
I need help figuring this out in java:
Write a generic method to count the number of elements in a collection that have a specific property (for example, odd integers, or even doubles). Then sum up the odd or even values.
I'm not really sure where to start with this problem, which is really my main issue. Anything would help, even an outline explaining how to go about getting a solution on my own. I appreciate all your help, thank you!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
