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.