The question is simple, what is the "technical" name (if it has one) of this kind of initialization of variables:
Random rn = new Random();
int a,b;
while((a = rn.nextInt(10)) != (b = rn.nextInt(10))) {
System.out.println("The different random numbers are a: " + a + ", " + b);
}
What I want to know is the name for the initialization of variables within parenthesis which is allowed pretty much everywhere where the type of the assigned variable matches with what its required by the language/compiler ( (a = rn.nextInt(10)) )?
The second question would be why does java allows that, is it just for "comfort"?, or is it there a deeper purpose rather than allowing the programmer to create more "one-liner" instructions?
P.S: I searched for things like inline initialization or things like that but I was not able to find anything related.