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?
x = 1 both assigns the value 1 to x and also 'returns' 1, it allows for things like this:
while ((line = reader.readLine()) != null)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With