Heron's Formula in Java

This is an implementation of Heron Formula in Java.
For those who do not know, Heron’s formula is a formula developed by Greek mathematician thousands of years ago. This formula is used to calculate the area of a triangle given the knowledge of all the sides.
For further information on Heron formula, you can go to here:

Implementation in Java is pretty straight forward. Simple arithmetic operation and sqrt method by Math class resolve the problem. The function is shown below.

image


That’s it for today. Cheers….

Comments

Popular posts from this blog

macOS Sierra Picture in Picture

Apple AirPods and Sweat

Einstein vs Professor