please help with my doubts:--
Integer io=new Integer("23");
int i=23;
System.out.println(io.equals(i)); // true ...why? ... but other way round i.equals(io) gives error (i cannot be deprecated...no idea whats dat
)
System.out.println(5.00f==5L); // long and float are incompatible types still no error ...why?
Long lt=53L;
Integer it=53;
int p=53;
System.out.println(lt==p); //true why the error incomparable dun pop-up
...becoz other way round the next statement execute with error...
System.out.println(lt==it); //error (Incomparable types) why
System.out.println(lt.equals(it)); //true becoz they refer to different objects...IS this the reason??
thank You..