logo

Crowdly

What is the output of the following JAVA code: int x = 10, y = 2, total = 0; ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What is the output of the following JAVA code:

int

x = 10, y = 2, total = 0;

while

(true)

{

total += x++ / 2 - y * 2 + x;

if

(total > 20)

break

;

y++;

}

System.out.print(total + y);

More questions like this

Want instant access to all verified answers on lms.aub.edu.lb?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!