Aug 31 2009

Quick Intro to the Ternary Operator

The Ternary Operator

The ternary operator is a source of confusion for many beginning programmers. In case you don’t know what the ternary operator is, it looks something like

String message = (isvalid?"Valid":"Invalid");

The ? represents the thought that goes through their head when they see it and they probably won’t get to the : .
Continue reading