In certain computer programming languages, the Elvis operator ?: is a binary operator that returns its first operand if that operand is true, and otherwise evaluates and returns its second operand. I find the Wikipedia definition pretty accurate: The Elvis operator is part of many programming languages, e.g. Additionally, the operator can throw an exception if null is returned. Otherwise the value of the second operand (which may be null) is returned. TL DR: If the resulting object reference is not null, it is returned.
0 Comments
Leave a Reply. |