I understand that:
value = (a > b) ? a : b;
is the same as:
if (a > b)
value = a;
else
value = b;
But I'm having trouble deciphering what this means:
EDIT (the previous example I used was not good, this is real code from another example):
Tracker t = (trackerId == TrackerName.APP_TRACKER) ? analytics.newTracker(PROPERTY_ID)
: (trackerId == TrackerName.GLOBAL_TRACKER) ? analytics.newTracker(R.xml.global_tracker)
: analytics.newTracker(R.xml.ecommerce_tracker);
How do I rewrite the last equation in terms of if
, else if
, and else
?