Given two snippets of code with the Boolean class.
Boolean true1 = true;
Boolean true2 = true;
System.out.println(true1 == true2); // true Boolean true1 = new Boolean(true);
Boolean true2 = new Boolean(true);
System.out.println(true1 == true2); // falseWhy results are different?