首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

4.15 最小化种的可变性

2013-08-09 
4.15 最小化类的可变性public static final Complex ZEROnew Complex(0, 0)public static final Complex

4.15 最小化类的可变性
public static final Complex ZERO=new Complex(0, 0);public static final Complex ONE=new Complex(1, 0);

?

?

3.在静态工厂方法里使用缓存的值或不可变对象,此方式可能要求不要使用final修饰需要缓存的属性

?

?

热点排行