When should a double equal sign (==) be used?
1. To set the value of a decimal variable
2. To set the value of a float variable
3. To check weather two pieces of data are actually equal
4. To indicate greater than or less than
1 answer
The double equal sign (==) should be used to check whether two pieces of data are actually equal. It is used for comparison between two values and returns a boolean (true or false) value. Therefore, option 3 is correct.