Ternary operator of Java

Logical operation? m : n; If the logical operation is true, M is returned; otherwise, n is returned

example:

Judge the size of I and J. if a is large, output 1, otherwise output 0;

Find the maximum value of I, J and K;

Output:

one

three

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>