Kotlin Programming Cookbook
上QQ阅读APP看书,第一时间看更新

How it works...

The bitwise operators in Kotlin aren’t built-in operators like in Java, but they can still be used as an operator. Why? Look at its implementation:

public infix fun shr(bitCount: Int): Int

You can see that the method has the infix notation, which enables it to be called as an infix expression.