java declare an int inside an if statement

Java
int v; // separate declaration
if((v = someMethod()) != 0) return true;
Source

Also in Java: