向下转型一定是new子类的对象,再转型;不能new父类的对象
Person p = new Man(); Man m = (Man)p;
integer i = new integer(1); integer j = new integer(1); i == j;//false integer m = 1; integer n = 1; m == n;//ture integer x = 128;//相当于new了integer对象 integer y = 128;//相当于new了integer对象
x == y;//false
自动装箱和new有什么区别?
Integer inScore = (Integer)obj; int score = inScore;