How to Get the Absolute Value with Math in Java
From Java Example Source Code
Contents |
[edit] Overview - How to Get the Absolute Value with Math in Java
This Java example program shows how get absolute value.
[edit] Java Source Code
- Package: example.math
- File: SquareRoot.java
package example.math; public class SquareRoot { public static void main(String[] args) { System.out.println(Math.abs(10 - 100)); } }
[edit] What Result You Can Get
Run the program, you will get:
90
[edit] Required External Libraries and/or Files for this Java Example
Need nothing.
[edit] How to Run this Java Example Program
We recommend running this Java example program with Eclipse.
For assistance in working with Eclipse, please see How to Run Java Program with Eclipse.
It's fairly easy.
[edit] Question & Answer
Any question?
Click edit and post your question or answer here.
