Sign up to request clarification or add additional context in comments.
Comments
1
Use equalsIgnoreCase() or equals() to compare 2 String objects....
String s = "hello";
String sOutput = "bbccaa";
if (sOutput.equalsIgnoreCase(s)){ // Ignore case while comparing
}
if (sOutput.equals(s)){ // Consider case while comparing
}