-8

So i got this code that im trying to understand, but i don't know the meaning of this operator:

paramInt >>>= 7;

If you guys could tell me that would be awesome! Thanks

BugsyFTW
  • 31
  • 1
  • 6

2 Answers2

0

>>>= is similar to += but with a unsigned right shift (>>>) operation.

int foo = Integer.parseInt("1000", 2);
//shift 3 times to the right : "1000" becomes "0001" = "1"
foo>>>=3;
System.out.print(Integer.toBinaryString(foo));

output :

1
Arnaud Denoyelle
  • 29,980
  • 16
  • 92
  • 148
0

It shifts a zero into the leftmost position of 7 and assigns the value to paramInt. The new paramInt value will be 3.

Mihai
  • 1
  • 1