Monday, January 4, 2010

What is this : a string + a boolean in the place of the ternary condition?

String s = "DIAMOND";
boolean red = true;
s += red ? ":red" : ":black";

No comments: