Integer i1 = 1000; //created with autoboxing, not with "new"
Integer i2 = 1000; // the same here
if you test i1==i2 you will get "TRUE" (the same object)
Integer i1 = 10;
Integer i2 = 10;
if you test i1 == i2 you will get "FALSE" (different objects)
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton