scottiedog45
06/12/2019, 11:06 AMvar phoneOrTablet : String = Resources.getSystem().getBoolean(R.bool.isTablet) ? "Tablet" : "Phone"
Daniel Garibaldi
06/12/2019, 12:23 PMMike
06/12/2019, 12:33 PMif
is an expression. if
is unambiguous and clear to understand whereas the ternary operator has been learned, and therefore, but isn’t.
Also, reduces potential confusion with the Elvis ?:
operator.