public class EqualsVersusEqualsMethodExample
{
	public static void main(String args[])
	{
		// EqualsVersusEqualsMethodExample
		Double d1 = new Double(1.23);
		Double d2 = new Double(1.23);
		Double d3 = new Double(4.56);
		Double d4 = d1;
		System.out.println(d1 == d1);
		System.out.println(d1 == d2);
		System.out.println(d1 == d3);
		System.out.println(d1 == d4);
		System.out.println(d1.equals(d1));
		System.out.println(d1.equals(d2));
		System.out.println(d1.equals(d3));
		System.out.println(d1.equals(d4));
	}
}
