Just found out that the usual power of (^) operation is not available in Java.
This wasted an hour of my time. So for anyone else who’s about to try, please use Math.pow instead of this operator. And no, it doesn’t give a compilation error either.
Instead of : 2 ^ 3, use Math.pow(2, 3).. tada, how convenient, NOT!
From what I know ^ is bit-wise xor operation.