Power written in Java