Uploaded by Monica Shannon

best

advertisement
Thank you for providing the input. If the input is "Hello Hello", then the corrected code I provided earlier will work as expected.
Here's the code with the provided input "Hello Hello":
```java
import java.util.*;
class Main {
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
String s1 = scn.next();
String s2 = scn.next();
if (s1.equals(s2)) {
System.out.println("Strings are equal");
} else {
System.out.println("Strings are not equal");
}
scn.close();
}
}
```
When you run the program and input "Hello Hello", the output will be "Strings are equal" since both the strings are the same.
Download