What is the meaning of "X ? a : b" notation?

Aky*_*kyl 1 java syntax

Possible Duplicate:
What is the Java ?: operator called and what does it do?

In some code a ? is used to perform a mathematical equation.

What is it and how do you use it? Is it possible to provide an example and the reason for the final answer of an equation?

int count = getChildCount();
int top = count > 0 ? getChildAt(0).getTop() : 0;
Run Code Online (Sandbox Code Playgroud)

And*_*rte 9

基本上是三元运算符:

String mood = (isHappy == true)?"I'm Happy!":"I'm Sad!"; 
Run Code Online (Sandbox Code Playgroud)

如果是快乐,那么"我很开心!"."我伤心!" 除此以外.