Possible Duplicate:
What is the Java ?: operator called and what does it do?
What is this type of code statement called? I've seen it in Java and C++ before, but I can't remember what it is called. int someVariable = (true) ? 1 : 0;
Possible Duplicate:
What is the Java ?: operator called and what does it do?
What is this type of code statement called? I've seen it in Java and C++ before, but I can't remember what it is called. int someVariable = (true) ? 1 : 0;
It is called ternary operator.
単純な条件チェックのためにコード行を避けるための三項演算子
int biggerNumber = a > b ? a : b;
さらに
int bigNumber = a > b ? (a > c ? a : c) : b > c ? b : c ;