
class Test { string s1="Hello",s2="lo"; System.out.println((s1=="Hel"+"lo")); System.out.println((s1=="Hel"+lo)); } The above program prints true false I just want to know why the answer of both the println method differs.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
