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

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!