1.

Q15. Differentiate between comparison operator and identity operator with example.​

Answer»

Answer:

IDENTITY operator ( “is” and “is not” ) is used to COMPARE the object's memory LOCATION. When an object is created in memory a unique memory address is allocated to that object. '==' compares if both the object values are IDENTICAL or not. 'is' compares if both the object belongs to the same memory location.



Discussion

No Comment Found