valueOf(int i)API中文说明

/**valueOf(int i)中文说明
   public static Integer valueOf(int i) {
        assert IntegerCache.high >= 127;
        if (i >= IntegerCache.low && i <= IntegerCache.high)
            return IntegerCache.cache[i + (-IntegerCache.low)];
        return new Integer(i);
    }
     * Returns an {@code Integer} instance representing the specified
       返回一个Integer实例 该实例代表一个特定的值
     * {@code int} value.  If a new {@code Integer} instance is not
       如果一个Integer实例不是必须的
     * required, this method should generally be used in preference to
       那么该方法应该优先于构造函数Integer(int)被使用
     * the constructor {@link #Integer(int)}, as this method is likely
       因为该方法可能
     * to yield significantly better space and time performance by
       产生显著更好的时间和空间优势,因为其可以
     * caching frequently requested values.
     * 缓存经常被请求的值
     * This method will always cache values in the range -128 to 127,
       该方法总是缓存-128到127之间的值
     * inclusive, and may cache other values outside of this range.
     * 也不排除可能缓存在此范围之外的其他值
     * @param  i an {@code int} value.
       注:参数 i 一个int值
     * @return an {@code Integer} instance representing {@code i}.
       注:返回值 一个Integer实例,该实例代表这个i
     * @since  1.5
       注:从何时(版本)开始支持该API
     */
 
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值