public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.nextLine();
String b = sc.nextLine();
if(a.equals(b) == true) {
System.out.println("The strings are the same");
} else{
System.out.println("The strings are different");
}
}
}
Solution
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Andrew Bracero
28 February, 04:47
I believe the error is in the line
What I believe you meant to show is if true which would be
Not sure if that fixes the issue. Hope it does! Cheers 0