**Note: This post has been moved from an older blog. Don’t learn Java from here, check out this Java Programming tutorial by Derek Banas instead. Also, there isn’t a part 2. I couldn’t find it on The Wayback Machine so you’ll have to settle on the Source Code for Part 2 on Data Types.**

Like any good programming language, Java has a rich mathematical library, `java.lang.Math`

in addition to standard mathematical operations, like `+`

,`-`

,`*`

,`/`

.

Once again, it would be easier to see the code for yourself so here’s the Github links as well as an interactive example.

- Mathical: How to do math in Java. Source Code for Mathematical
- Conversions: Examples using the
`java.lang.Math`

library. Source Code for Conversions