Effective Java: Item 1
Static Factory Methods
Four Advantages:
1) have names
2) not required to create a new object each time they are invoked
3) return an object of any subtype of their return type
4) reduce the verbosity of creating parameterized type instances.(for example: newInstance() method)
相关文档:
在尚学堂学完java让我轻松搞定工作
【学员故事】来自尚学堂真人真事 &n ......
/*
一共3个移位运算符,左移位<<,右移位>>和无符号移位>>>。左移位<<在低位处补0。右移位>>若值为正则在高位插入0,若值为负则在高位插入1。无符号右移位>>>无论正负都在高位处插入0。
非运算符~
&对两个整型操作数中对应位执行布尔代数,两个位都为1时输出1,否则0。
......
/**我这只讲 ListArray ,ListedList,HashMap
//ListArray 它是一个实现了List接口的类 ,List继承collection接口
//调用import java.util.ArrayList包,(这里两者任选其一) 完整的java集合存放在java.util包中
//特点:
1>.List是有序的集合
2>.List可以有重复的元素值
3>.使用索引来精确的访问元素值,
4& ......
java 代码实现
public static boolean isLetter(char c) {
int k = 0x80;
return c / k == 0 ? true : false;& ......