Reputation: 9319
I don't know the right name in english when you want to calculate a number with a upper small number besides. Like 1,5 with a small 3 besides (the calculation of 1,5 * 1,5 * 1,5)
Is there a simple and uncomplicated way to do this in java? I want to calculate the volume. I hope you understand my question.
Thanks.
Upvotes: 0
Views: 212
Reputation: 471569
The term is called "power" or "exponent". In Java you can do it as:
Math.pow(1.5,3);
Upvotes: 6
Reputation: 1837
I think the word you want is "exponent". Math.pow(a,b) = a^b, so for example Math.pow(1.5,3) = 1.5 * 1.5 * 1.5. Good luck.
Upvotes: 3