mercredi 26 août 2015

How to compare two long value at runtime in java

How to compare two long value at runtime. When I got the value of both of long type variable at runtime which same so it should be print else part but the both value is different from each other so it should be print if part.

Long dbData = 54188439.... // Got the value at run time
Long spreadSheet = 54188439.....//Got the value at run time

if(dbData != spreadSheet)
{
Log.i("","Please update your contact");
}
else
{
Log.i("","Not required");
}  

Here I always got if part whatever be the condition. Please help me out.

Aucun commentaire:

Enregistrer un commentaire