How can I get a long number bigger than Long.MAX_VALUE?
I want this method to return true:
true
boolean isBiggerThanMaxLong(long val) { r
You can't. If you have a method called isBiggerThanMaxLong(long) it should always return false.
isBiggerThanMaxLong(long)
false
If you were to increment the bits of Long.MAX_VALUE, the next value should be Long.MIN_VALUE. Read up on twos-complement and that should tell you why.
Long.MAX_VALUE
Long.MIN_VALUE