int num=false?10:20
system.out.println(num)
Answers
Answered by
0
Answer:
20
Explanation:
The ternary operator in Java checks for true or false. And choose the first value if the condition is true and if false chooses the second.
In, int num = false?10:20, the condition itself false, it prints 20
Similar questions
Math,
2 months ago
Science,
2 months ago
CBSE BOARD X,
2 months ago
World Languages,
5 months ago
Physics,
5 months ago
Geography,
11 months ago
Math,
11 months ago