Answer:
Following are the expression in the Java language
public class Main
{
public static void main(String[] args) // Main method
{
boolean young= true; // variable declaration
boolean famous= true;// variable declaration
if(young && famous) // check the condition
System.out.println("You must be rich " );// display message
}
}
Output:
You must be rich
Step-by-step explanation:
Following are the description of the above statement
- Declared a variable "young " of the boolean type that is initialized with the "true" value.
- Declared a variable "famous " of the boolean type that is initialized with the "true" value.
- Check the condition of if() block.If the condition is true then it executed the condition inside the if block.
- Finally ,print the message "You must be rich!"