Java has binary-or |
and binary-and &
operators:
int a = 5 | 10;
int b = 5 & 10;
They do not seem to work in Kotlin:
val a = 5 | 10;
val b = 5 & 10;
How do I use Java's bitwise operators in Kotlin?
Java has binary-or |
and binary-and &
operators:
int a = 5 | 10;
int b = 5 & 10;
They do not seem to work in Kotlin:
val a = 5 | 10;
val b = 5 & 10;
How do I use Java's bitwise operators in Kotlin?
You have named functions for them.
Directly from Kotlin docs
for example:
you can do this in Kotlin
here list of operations that you can use