When two String objects have the same value. When we are using == this operators is called the equal() method.
When we want to determine if two objects are meaningfully equivalent, use the equals() method. this operator returns a boolean value true this means that that are equal .if returns false .that means its doent.here we have a code .that are following here :
String x1 = \"abc\";
String x2 = \"ab\";
x2 = x2 + \"c\";