0
Different between single (=) and double (==)?
6 odpowiedzi
+ 6
Example : x=8 means that you have assigned 8 to x,but x==8 means you are checking that x is equal to 8 or not
+ 2
(=) is an assignment operator which assigns the value of one variable to another...Like a=b here the value of b is assigned to a...And the (==) is an comparison operator which compares the value of 2 variables.... Like (a==b) here the value of a and b are compared...!!!
0
= is an assignment operator and == is an equality operator
0
You use '=' when you are trying to specify a variable and you use '==' this when trying to initialize that this variable is equal to this variable. Int x = 5; if(x == 5){
//the code that would be compiled if the statements is true
}
0
= is assignment operator , where u use it for assign any value through any type of data type and another == is equal operator , used for check any two values equal or not.