Re: interpretation help of ?:
- From: Philipp Leitner <philipp.leitner@xxxxxx>
- Date: Thu, 27 Apr 2006 21:16:46 +0200
well, at least it shows very clearly why I am always trying to stay away from it as far as possible :-)
Your example shows very well how awefully complicated you can write easy things using ternary operators, just to fit them in one LOC.
/philipp
Petterson Mikael schrieb:
How shall i interpret the use of ?: operator in the code below?.
cheers,
//mikael
String getGetTestCaseWriterName(MomClass momClass) {
return isMoDataPersisten(momClass)
? momClass.getName().charAt(0) <= 'N' ? GET_TEST_A_N
: GET_TEST_O_Z
: GET_TEST_CC;
}
- References:
- interpretation help of ?:
- From: Petterson Mikael
- interpretation help of ?:
- Prev by Date: Re: Jbuilder vs. Eclipse
- Next by Date: Eclipse - need support
- Previous by thread: Re: interpretation help of ?:
- Next by thread: eclipse - cannot import filesystem
- Index(es):