Java: How to square a number
Briefly

You can square a number in Java in at least two different ways: Multiply the number by itself or call the Math.pow function.
In general, I just multiply the number by itself to get the squared value, but the advantage of the Math.pow method is that once you know how to use it, you can easily cube a number.
Read at Alvinalexander
[
|
]