+ 3
A little help here!!!
What the HECK is wrong with this code??? https://code.sololearn.com/cTKBS5P9n6TG/?ref=app
5 ответов
+ 10
@Tabeer Murtaza: It's done using the Integer wrapper class, take this example:
int x = 10;
Integer y = new Integer(x); // This is an integer object now.
System.out.print(y.equals(x));
+ 11
yknow, errors are friends, not foes. try looking up what the error means online.
+ 7
FYI, the equals() method doesn't work on integers (of course, because integers cannot be dereferenced).
There's a way if you can create objects, have a look:
https://stackoverflow.com/questions/13971523/integer-equals-method
+ 4
Well I agree with you....
+ 3
@Dev brother, link you provided confused me even more, probably because of alien English they used, can you please tell me how to create integer objects (in simple words).