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 साठवतो, == तुलना करतो. यांची गल्लत करणे ही सर्वात सामान्य चुकांपैकी एक आहे.