I'm constantly switching from C++ to Java bc I like both. Can someone explain me why java doesn't accept numbers as conditionals? Example:
C++
int val {1};
if (val) {} // FINE.
Java:
int val = 1;
if (val) {} //error
Even that needs to be verbose 
Java:
[...]
int val = 1;
if (val == 1) {} // fine
Why is that? I'm not talking about business decisions, but why Java can't treat ints as booleans? What is happening in background?


But thanks I'll take a further look later

