Java Software Solutions >EX2.8 > Solution

Problem:

What value is contained in the integer variable length after the following statements are executed?
length = 5;
length *= 2;
length *= length;
length /= 100;

Output:

Not Applicable

Solution:

The final value stored in length is 1.

No comments:

Post a Comment