X571: hasOdd

This method takes an integer array as a parameter and returns true if the array includes an odd integer; otherwise, the method returns false. For example, if the array passed stores {12, 7, 8, 25, 3}, the method returns true. If the array contains 0 element, the method returns false.

Examples:

hasOdd({12, 7, 8, 25, 3}) -> true

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.