Hi everyone,
I'm just wondering in Java, if there was a way to just check once for a number in an array?
for (int i = 0; i < array.length; i++)
{
if (array[i]>0){
count++;
}
}
This code will check for all positive numbers. Is there a way to just check for the first positive number and ignore the rest?