one line if statement java

Java
statement ? true : false
Source

Also in Java: