Check out example codes for "if en une seul ligne java". It will help you in understanding the concepts better.

Code Example 1

variable  = condition ? valeur_si_vrai : valeur_si_faux

Learn ReactJs, React Native from akashmittal.com