The & operator in Java is a bitwise AND - which returns zero where any bit in either side of the operator is zero, and one only where the bit in the same position on both sides is one.
So
i&1
will return the least significant bit of the number: because you specified the constant 1 - which has only a single bit set, in the least significant position it will ignore all the other bits in the integer, and return a one or zero based solely on the content of the least significant bit.
And since you increase
i
by one each time you go round the loop, the value of that least significant bit will change from 0 to 1 each time round. You start with zero, and the last time round the loop is with
i
equal to nine, so you will end with one:
0101010101