Skip to main content
Code sample in Swift, C# and Java
Main menu
About
History
Swift
C#
Java
Python
You are here
Home
»
Forums
»
Java
»
Java: Work with simple types
»
Java: Work with numbers
»
Java: Mathematical operations
Power in Java
Submitted by
obraztsov
on Thu, 11/24/2016 - 17:45
Forums:
Java: Mathematical operations
int
number
= 8;
int
power
= 3;
double
result
= Math.
pow
(
number
,
power
);
//result is 512.0
Log in
to post comments