/*** Automatic packing: * integer num1 = 12; * Automatic unpacking: * system. out. println (num1 + 12); * Basic Data Type object cache: * integer num1 = 12; * integer num2 = 12; this is equal, and <= 127 is true * system. out. println (num1 = num2); * integer num3 = 129; this part is not equal because it is an object * integer num4 = 129; * system. out. println (num3 = num4); * integer num5 = integer. valueof (12); * integer num6 = integer. valueof (12); the principle of this piece is the same as that of * system. out. println (num5 = num6); * @ author partner4java **/public class helloworld1 {public static void main (string [] ARGs) {// within one byte (enjoy the metadata mode -- flyweight) integer int1 = 12; integer int2 = 12; system. out. println ("int1 = int2:" + (int1 = int2); // an integer other than one byte int3 = 128; integer int4 = 128; system. out. println ("int3 = int4:" + (int3 = int4); integer int5 = new INTEGER (12); integer int6 = new INTEGER (12); system. out. println ("int5 = int6:" + (int5 = int6); integer int7 = integer. valueof (12); integer int8 = integer. valueof (12); system. out. println ("int7 = int8:" + (int7 = int8); string str1 = "ABC"; string str2 = "ABC"; system. out. println ("str1 = str2:" + (str1 = str2); string str3 = new string ("ABC"); string str4 = new string ("ABC "); system. out. println ("str3 = str4:" + (str3 = str4); // background print: // int1 = int2: True // int3 = int4: false // int5 = int6: false // int7 = int8: True // str1 = str2: True // str3 = str4: false }}