Computer Science, asked by Anonymous, 4 months ago

when to use == in Java and what does (s==n) mean ?​

Answers

Answered by himanshu2006vps
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