CSC300 / CSC402: Integer Constructor (Deprecated) [19/24] |
Integer x = new Integer(30); Integer y = new Integer(30); x=30, y=30 x==y : false Objects.equals(x,y) : true x.equals(y) : true |
Again, the new
operator in Java guarantees the construction of a new object.