This was a stupid question. I was still learning and was drastically overthinking the situation.
In the source code for Integer
, it shows MIN_VALUE
and MAX_VALUE
declared as:
public static final int MIN_VALUE = 0x80000000;
public static final int MAX_VALUE = 0x7fffffff;
My question is, how do these int
s get declared in the first place? It seems as though these values would have to be known in order for the values to be validated (or overflow, or whatever) to begin with. It obviously can't check itself before it's declared, so how does this work?