when to use == in Java and what does (s==n) mean ?
Answers
Answered by
2
Explanation:
Equality operator(==)
We can apply equality operators for every primitive types including boolean type. we can also apply equality operators for object types.
If we apply == for object types then, there should be compatibility between arguments types (either child to parent or parent to child or same type). Otherwise we will get compile time error.
(s==n) means that value of s is equal to the value of n
Similar questions
India Languages,
2 months ago
World Languages,
2 months ago
Math,
4 months ago
Computer Science,
4 months ago
Biology,
10 months ago
Math,
10 months ago
English,
10 months ago