This week's book giveaways are in the Jython/Python and Object-Oriented programming forums. We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line! See this thread and this one for details.
What you pass to a method is an expression. An if() statement is not an expression. However you can achieve the same effect with an expression that uses a ternary operator "?:". Example:
Note the parens around the conditional are technically not required but often used for clarity for the reader.