Lesson 8 of 34
&&, || మరియు !: Conditions ను కలపడం
8 min 25 XP
&& (AND) రెండు వైపులా true అయినప్పుడే true. || (OR) ఏదో ఒక వైపు true అయితే true. ! (NOT) true ను false గా, false ను true గా మారుస్తుంది.
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.చిన్న if/else ను ternary operator తో ఒకే లైన్లో రాయవచ్చు: condition ? value1 : value2
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.