santhosh kumar vk wrote:then we will go for equals of object class instead of string.equals to check the string object
I don't understand what you mean by this? You don't get to choose.
But yes, Object has an .equals() method, as does String. The are different for good reason. Pretty much all you need to know about the == operator and .equals() method in relation to Strings can be found in this CodeRanch FAQ article