Question: This is allowed by the Java compiler, what is it doing?

```
int x = x = 1;

```

I realize that x is assigned to x, but how can it have two `=`s?

Answer: 
x = 1 both assigns the value 1 to x and also 'returns' 1, it allows for things like this:

```
while ((line = reader.readLine()) != null)

```
`int x` puts `x` on the stack.

The right hand part `x = 1` assigns 1 to `x`. But this is an *expression* with value 1.

Finally this is re-assigned to `x`.