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 ? மதிப்பு1 : மதிப்பு2
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.