Question: Write a static method any() that takes a boolean array as its argument and returns true if any of the elements in the array is
Write a static method any() that takes a boolean array as its argument and returns true if any of the elements in the array is true, and false otherwise.
Write a static method all() that takes an array of boolean values as its argument and returns true if all of the elements in the array are true, and false otherwise.
Step by Step Solution
3.39 Rating (158 Votes )
There are 3 Steps involved in it
Sure you can achieve this by using a simple loop in both cases Heres how you can do it ... View full answer
Get step-by-step solutions from verified subject matter experts
