Java Reference
In-Depth Information
Type
Range
-128 to 127
int
So given the method
static boolean sameArgs(Integer a, Integer b) {
return a == b;
}
the following invocation returns TRue :
sameArgs(3, 3)
while this invocation returns false :
sameArgs(3, new Integer(3))
An implementation of the virtual machine may choose to expand on
these types and ranges, and is free to determine when instances of the
wrapper classes are first created: They could be created eagerly and all
stored in a lookup table, or they could be created as needed.
Dare to be naïve.
R. Buckminster Fuller
 
Search WWH ::




Custom Search