Multiplication vs ^ operator vs Math.pow() for integer powers [closed]
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I got curious about the way power calculation is done in Java and the performance of available methods. So I wrote a simple test to check on Math.pow() , * and ^ operations. public static void main(String[] args)