shorthand if java without else

Java
if(statement1 && statement2) doSomething();
Source

Also in Java: