X59: only14

Given an array of ints, return true if every element is either a 1 or a 4. Otherwise, return false.

Your Answer:

x
 
1
public boolean only14(int[] nums)
2
{
3
    
4
}
5
Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.