Lesson 6 of 34

if మరియు else: నిర్ణయాలు తీసుకోవడం

8 min 25 XP

Condition true అయినప్పుడే 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.

Comparison 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.

= value ను నిల్వ చేస్తుంది, == పోలుస్తుంది. వీటిని కలపడం అత్యంత సాధారణ తప్పులలో ఒకటి.

Challenge

+25 XP

ఒక విద్యార్థి మార్కును చదవండి. 35 లేదా అంతకంటే ఎక్కువ అయితే "Pass", లేకపోతే "Fail" print చేయండి.

Output Loading Java (first time takes a few seconds)
Press Run to see the result here.