what is this means
int x=14,y=6, min,
min = x>y?y:x;
i tried find it in my book and no luck.
Printable View
what is this means
int x=14,y=6, min,
min = x>y?y:x;
i tried find it in my book and no luck.
I could try to be clever and tell you the colon is mainly there to absorb water, a few nutrients, and to form the stool into a shape and consistency proper for defecation, but that would probably not be what you want to hear. ;)
What you are displaying is the ternary operator, and this is a frequent question. Have a look at this recent link: http://www.java-forums.org/new-java/...shorthand.html
i just use a mnemonic for this:
min = ( IF ) ? ( THEN ) : ( ELSE )
GOT IT! thankyou guys.