Java tutorial
public class Main { public static void main(String[] args) { Float obj1 = new Float("10"); Float obj2 = new Float("10.0"); System.out.print(obj1 + " = " + obj2); System.out.println(" ? " + obj1.equals(obj2)); obj1 = new Float("20"); obj2 = new Float("6.000000"); System.out.print(obj1 + " = " + obj2); System.out.println(" ? " + obj1.equals(obj2)); } }