CSC300: Integer Boxing with valueOf [17/23] Previous pageContentsNext page

Integer x = Integer.valueOf(30);
Integer y = Integer.valueOf(30);
x=30, y=30
                  x==y : true
   Objects.equals(x,y) : true
           x.equals(y) : true
eqi08

Previous pageContentsNext page