assign value to variable based on condition android code example
Example: java declare an int inside an if statement
int v; // separate declaration
if((v = someMethod()) != 0) return true;
int v; // separate declaration
if((v = someMethod()) != 0) return true;