for (int i = 0; i < numArray.size(); i++) {
if (numArray.get(i) % 2 == 0) {
evenSum += numArray.get(i);
outputArea.append(numArray.get(i) + "\n");
}
}
Is there any way to get the line
if (numArray.get(i) % 2 == 0) {
in the for loop condition line? And if so, would that be more efficient than how it is right now?