[Solved] Understanding the ? notation for Java [duplicate]

[ad_1]

This is ternary IF operator. This line is equal to

int mPart;
if(i < mParts.length) {
   mPart = Integer.parseInt(mParts[i]);
} else {
   mPart = 0;
}

3

[ad_2]

solved Understanding the ? notation for Java [duplicate]