Because on line 6, a new value of 4 is assigned to it. Line 7 will use the new value of 4, not the value of 10 that was initially passed in. You can declare the parameter x as final to avoid things like this, or just don't assign new values to x in the body of the method/constructor.
The best ideas are the crazy ones. If you have a crazy idea and it works, it's really valuable.—Kent Beck