Hello All,
I am trying to compare a long value with Inter.MAX_VALUE*2, like
long lNum = Long.parseLong("222");
if(lNum <= (Interger.MAX_VALUE*2))
{
// Do something;
}
But the if condition always return false. Interger.MAX*2 will give me an int, converting int to long is widen conertion and should be fine. I don't know what I am missing here. Could anyone give me a hint?
Thank you
I am trying to compare a long value with Inter.MAX_VALUE*2, like
long lNum = Long.parseLong("222");
if(lNum <= (Interger.MAX_VALUE*2))
{
// Do something;
}
But the if condition always return false. Interger.MAX*2 will give me an int, converting int to long is widen conertion and should be fine. I don't know what I am missing here. Could anyone give me a hint?
Thank you