In Python, you can put a simple if-then-else statement on one line using the ternary operator, which is represented by the "?" symbol.
In Java, you can use the ternary operator (also known as the conditional operator) to create a short form for an if-else statement.