Question: What does the following checkItOut method return? public static boolean checkItOut(int[] a) { int i = 1; while (i < 10, && i < a.length
What does the following checkItOut method return? public static boolean checkItOut(int[] a) { int i = 1; while (i < 10, && i < a.length && a[i] != a[i-1]) i++; return i >= 10; }
a. true if a has 10 or more elements false otherwise
b. true if a has 10 or more elements and all the elements among the first 10 are different false otherwise
c. true if all the elements among the first 10 (or all the elements in a if a has fewer than 10) are different false otherwise
d. none of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
