源码如下:/***Returnsan{@codeInteger}instancerepresentingthespecified*{@codeint}value.Ifanew{@codeInteger}instanceisnot*required,thismethodshouldgenerallybeusedinpreferenceto*theconstructor{@link#Integer(int)},asthismethodislikely*toyieldsignificantlybetterspaceandtimeperformanceby*cachingfrequentlyrequestedvalues.**Thismethodwillalwayscachevaluesintherange-128to127,*inclusive,andmaycacheothervaluesoutsideofthisrange.**@paramian{@codeint}value.*@returnan{@codeInteger}instancerepresenting{@codei}.*@since1.5*/publicstaticIntegervalueOf(inti){if(i>=IntegerCache.low&&i
添加回答
举报
0/150
提交
取消