class demo {
public static void main(String args[]) {
String s1 = new String(“Welcome”);
String s2 = new String(“Welcome”);
if ( s1.equals(s2) ) {
System.out.println(“The strings are the same.”);
}
else {
System.out.println(“The strings are not the same.”);
}
}
}