Boolean[] boolean2 = new Boolean[100];
Boolean[] boolean3 = new Boolean[100];
for (int i = 0; i < 100;i++){
boolean1[i] = Boolean.valueOf(1==1);
}
for (int i = 0;i < 100;i++){
boolean2[i] = new Boolean(1==1);
}
for (int i = 0; i < 100;i++){
boolean3[i] = 1==1;
}
System.out.println("valueOf: " + String.valueOf(boolean1[1] == boolean1[2]));
System.out.println("new Boolean: " + String.valueOf(boolean2[1] == boolean2[2]));
System.out.println("auto wrap: " + String.valueOf(boolean3[1] == boolean3[2]));
new Boolean: false
auto wrap: true