Lesson 6 of 34
if और else: निर्णय लेना
8 min 25 XP
if कोड तभी चलाता है जब condition true हो; वरना 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 रखता है, == तुलना करता है। इन्हें मिलाना सबसे आम गलतियों में से एक है।