Generally i write this kind of code in my programs to compare two strings & it works fine.
but i want to know whether in C#, it actually compares two string values or is it comparing the addresses of two strings. How am i getting correct results?
Also,it will be very nice if you guys can tell me how above code behaves in Java
Code:
string s="Hello";
if(s=="Hello")
{
code to execute.
}
Also,it will be very nice if you guys can tell me how above code behaves in Java
Comment