Create a gist now

Instantly share code, notes, and snippets.

@l1x /integer.clj
Last active Oct 6, 2017

What would you like to do?
user=> Integer/MAX_VALUE
2147483647
user=> (type Integer/MAX_VALUE)
java.lang.Integer
user=> (+ Integer/MAX_VALUE 1)
2147483648
user=> (type (+ Integer/MAX_VALUE 1))
java.lang.Long
user=> Long/MAX_VALUE
9223372036854775807
user=> (+ Long/MAX_VALUE 1)
ArithmeticException integer overflow clojure.lang.Numbers.throwIntOverflow (Numbers.java:1501)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment