this line means that you reserved a memory pointed by a and has the value "SMS Message". So when you say if(a==b), you are comparing the addres of the memory (like JamesCherrill said). But what you want to do is to compare the value of this memory so you use the "equals" method
There is nothing wrong with your post, but please be aware when answering Ermina. He/She has a history of posting homework questions and expecting someone to provide the answer, and doesn't seem to want to do any work (eg: didn't bother to follow up the API reference that I gave above).
Just providing complete answers isn't going to help him/her develop a constructive attitude to learning Java
??? the variables are reference variables, and their values are references, so the original comment about comparing the values that the references refer to seems right to me... or did you have something else in mind?