What will be the output of the code given below?
public class Tester {
public static void main(String[] args) {
int sum = 0;
for (int i = 2; i < 8; i += 2) {
for (int j = 8; j > i; j -= 2) {
if (i >= j / 2) {
continue;
} else {
sum += i + j;
}
}
}
System.out.println("Sum = " + sum);
}
}
Sum = 8
Sum = 18
Sum = 27
Sum = 36
To get all Self Assessment - Programming using Java Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee