Bird
0
0

Which logical operator in Kotlin means AND and returns true only if both conditions are true?

easy📝 Conceptual Q11 of 15
Kotlin - Operators and Expressions
Which logical operator in Kotlin means AND and returns true only if both conditions are true?
A||
B!
C&&
D&
Step-by-Step Solution
Solution:
  1. Step 1: Understand the meaning of && operator

    The && operator checks if both conditions are true and returns true only then.
  2. Step 2: Compare with other operators

    The || operator means OR, ! means NOT, and & is a bitwise operator, not logical AND.
  3. Final Answer:

    && -> Option C
  4. Quick Check:

    AND operator = && [OK]
Quick Trick: AND means both true, use && [OK]
Common Mistakes:
MISTAKES
  • Confusing && with ||
  • Using & instead of &&
  • Thinking ! means AND

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kotlin Quizzes