So... how can make an int that can take the value of an Integer?
it is funky that you cant do something like this:
int a;
Integer b=new Integer("0");
a=b; //error go to ****
:)
Printable View
So... how can make an int that can take the value of an Integer?
it is funky that you cant do something like this:
int a;
Integer b=new Integer("0");
a=b; //error go to ****
:)
Code:If (a == b.intValue())
Or
Code:a = b.intValue();
ohhh... thank you
Yeah you definitely wouldn't be allowed to compare a refrence type to a primative type. You would have to get the Integers value through the intValue(); method that filburt pointed out.
:)