Another useful thing to do with collections is see if any or all of the elements match a certain criteria. For example, if I'm gathering temperature data, I want to sound an alarm if any temperature in an array is over 100 degrees. I want to shut down the system I'm monitoring if all of the temperatures in the sample are over 100 degrees.
Comments
No comments yet. Leave a Comment

