Essa pergunta também está no material:
Respostas
The ternary operator is a conditional operator in programming that allows you to assign a value to a variable based on a Boolean expression. It has the following syntax: variable = (condition) ? value1 : value2; If the condition is true, value1 is assigned to the variable. If the condition is false, value2 is assigned to the variable. For example: int age = 18; String status = (age >= 18) ? "Adult" : "Minor"; In this example, if the age is greater than or equal to 18, the status variable will be assigned the value "Adult". Otherwise, it will be assigned the value "Minor". Regarding the options you provided, the correct answer would be: c) Both affirmations are correct.
Responda
Para escrever sua resposta aqui, entre ou crie uma conta