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 ? value1 : value2
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.