erreo in code

hi...plz tell me the reason of compilation error in the following codeInteger i = new Integer(0);Float f = new Float(0);System.out.println(i==f);System.out.println(i.equals(f));
[212 byte] By [biswa_orkuta] at [2007-11-27 7:01:36]
# 1
Post the error message, please.
thomas.behra at 2007-7-12 18:52:27 > top of Java-index,Java Essentials,Java Programming...
# 2
== can only be used to compare the references of two variables of the same type (I'm not talking about primitives here!).
prometheuzza at 2007-7-12 18:52:27 > top of Java-index,Java Essentials,Java Programming...
# 3
> == can only be used to compare the references of two variables of the same type (I'm not talking about primitives here!). Thank you.
biswa_orkuta at 2007-7-12 18:52:27 > top of Java-index,Java Essentials,Java Programming...