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.