Q15.
Differentiate between comparison operator and identity operator with example.
Answers
Answered by
1
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.
Similar questions