We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f01569 commit b9522a3Copy full SHA for b9522a3
1 file changed
ch04/DemoMath.java
@@ -0,0 +1,21 @@
1
+public class DemoMath
2
+{
3
+ public static void main(String[] args)
4
+ {
5
+ int a = -5;
6
+ int b = 7;
7
+ double ab = 1.2;
8
+
9
+ System.out.println("A): " + a);
10
+ System.out.println("A demo: " + Math.abs(a));
11
12
+ System.out.println("B): " + b);
13
+ System.out.println("B demo: " + Math.max(a, b));
14
15
+ System.out.println("C): " + ab);
16
+ System.out.println("C demo: " + Math.pow(ab, ab));
17
18
+ System.out.println("D): " + Math.PI);
19
20
+ }
21
+}
0 commit comments