Hi guys!
I'm completely new to
java and I decided to take a look at the book 'Head first java' which I know a lot of you guys have as well.
Well this is from the first mixed messages section, and here is the code:
The answer of the output is '00 11 21 32 42'
To me this the code is saying
1) X = 0
2) Y = 0
3) While X is less than 5 (which it is always)
4) y (0) = x (0) - y(0) and to me the sum of this is always 0 :S
5)Print out x(0) + blank space + y(0) + blank space
so to me the output should look like this
0 0 0 0 0 0 0 0 0 0 0 0 etc LOL =[
Could someone please explain it to me, because i'm feeling a bit demotivated by not even being able to do the first couple of exercises haha.
Cheers guys,
Loz.