码迷,mamicode.com
首页 > 其他好文 > 详细

001

时间:2017-12-10 21:20:54      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:构造   nbsp   静态工厂方法   blog   hold   ons   最大   ati   can   

 

第一条,考虑用静态工厂方法代替构造器创建对象

/**
* A constant holding the minimum value an {@code int} can
* have, -2<sup>31</sup>. 
*/

//int类型的最小取值-2的31次方,-2147483648

@Native public static final int MIN_VALUE = 0x80000000;

/**
* A constant holding the maximum value an {@code int} can
* have, 2<sup>31</sup>-1.
*/

//int类型的最大取值2的31次方减一,2147483647
@Native public static final int MAX_VALUE = 0x7fffffff;

001

标签:构造   nbsp   静态工厂方法   blog   hold   ons   最大   ati   can   

原文地址:http://www.cnblogs.com/miye/p/8017995.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!