2 ms·
While Java doesn't have unsigned types, it at least with java8 got functions to operate on ints as if they were unsigned. But Kotlin (also running on the jvm)
by matsemann 5y ago
While Java doesn't have unsigned types, it at least with java8 got functions to operate on ints as if they were unsigned.
But Kotlin (also running on the jvm) got unsigned types with built in operator overloading for them, making it easy to work with. "val a = 100u" gives you an unsigned Int. If you use Java, there are few reasons not to use Kotlin. https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/ https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/