What is the difference between identical to and equal to? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the difference between identical to and equal to?

Does identical to mean that if one instance changes, the other will change as well?

24th Jul 2016, 2:15 PM
Izyzi
Izyzi - avatar
5 Answers
0
yes, "identical to" is to check the same reference and "equal to" is to check the same value. e.g., let "a" and "b" are same reference. if you change a's value, b's value will change.
21st Aug 2016, 8:25 AM
Aung Thuya
Aung Thuya - avatar
0
In swift we have (===) and (==) === which checks if is identical; checks if the values look exacly the same. And === checks if both values point to the same reference
29th Oct 2016, 10:28 AM
Mo Henry
Mo Henry - avatar
0
In swift there are 3 types:1)=== for comparing the 2 instances,2)== for checking 2 strings or 2 elements of an array or comparing 2 values in a variables 3)= for assigning value to a variable.
12th Nov 2016, 4:14 AM
Akshay Kamat
Akshay Kamat - avatar
0
One and 1 are equal, but not identical.
13th Nov 2016, 12:00 AM
Mark van Gennip
Mark van Gennip - avatar
- 1
yes, identical to mean that two references have a same insrance and that's the case withe classes
26th Jul 2016, 1:50 AM
Lam Khalid
Lam Khalid - avatar