X1621: Are all elements odd?

Write the method boolean areAllOdd(int[] nums) in Java that returns true if all elements in the array nums are odd numbers, and returns false otherwise.

Examples:

areAllOdd({-82,62,-88,-78,2,74,88}) -> false
areAllOdd({59,-75,23,17,69,-11,75}) -> true

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.