I have a boolean array in java:
boolean[] myArray = new boolean[10];
What\'s the most elegant way to check if all the values are true?
This is probably not faster, and definitely not very readable. So, for the sake of colorful solutions...
int i = array.length()-1; for(; i > -1 && array[i]; i--); return i==-1