We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9271f1 commit 83ded37Copy full SHA for 83ded37
1 file changed
src/com/winterbe/java8/samples/misc/StrictMath1.java
@@ -0,0 +1,18 @@
1
+package com.winterbe.java8.samples.misc;
2
+
3
+/**
4
+ * @author Benjamin Winterberg
5
+ */
6
+public class StrictMath1 {
7
8
+ public static void main(String[] args) {
9
+ System.out.println(Integer.MAX_VALUE + 1);
10
11
+ try {
12
+ Math.addExact(Integer.MAX_VALUE, 1);
13
+ }
14
+ catch (ArithmeticException e) {
15
+ System.out.println(e.getMessage());
16
17
18
+}
0 commit comments