You are viewing a single comment's thread. Return to all comments →
Ahh that's how you access the MAX_VALUE and MIN_VALUE constants. Thanks.
Just a note, you could remove if (x >= Long.MIN_VALUE && x <= Long.MAX_VALUE). x has to be a long by definition so we don't have to check it.
if (x >= Long.MIN_VALUE && x <= Long.MAX_VALUE)