Problem trying to compare 2 values of type Integer in IF condition
I havd pop a value of type Integer from a stack into a variable, but the If conditions does not seem to work:
iqueuedVar = conn3.removeFromFeed();
System.out.println(iqueuedVar);
Integer test = new Integer(123);
if(test == iqueuedVar)
{
System.out.println("It Works !!");
....
....
The Integer test searched for the popped value 123 - which exists - but the IF condition is not working.
I'm using API 1.4.2 - Please help ?
[490 byte] By [
Godela] at [2007-10-1 21:49:43]

> I havd pop a value of type Integer from a stack into
> a variable, but the If conditions does not seem to
> work:
>
> iqueuedVar = conn3.removeFromFeed();
> System.out.println(iqueuedVar);
> Integer test = new Integer(123);
> if(test == iqueuedVar)
> {
>System.out.println("It Works !!");
> ....
> ....
>
> The Integer test searched for the popped value 123 -
> which exists - but the IF condition is not working.
>
> I'm using API 1.4.2 - Please help ?
get the int value from Integer.Then compare two int value