Lesson 6 of 34
if மற்றும் else: முடிவெடுத்தல்
8 min 25 XP
ஒரு condition true ஆக இருந்தால் மட்டும் code-ஐ இயக்க if பயன்படுத்துகிறோம். இல்லையெனில் else பகுதி இயங்கும். Condition-ஐ ( ) brackets உள்ளே எழுத வேண்டும்.
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.ஒப்பீட்டு operators: == சமம், != சமமில்லை, > பெரியது, < சிறியது, >= பெரியது அல்லது சமம், <= சிறியது அல்லது சமம். இவை boolean (true/false) மதிப்பைத் தரும்.
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.= மதிப்பைச் சேமிக்கும், == ஒப்பிடும். இதைக் குழப்புவது மிகச் சாதாரண தவறு.