Equals() method is not working / always giving FALSE

Please either format your code or link to your submission :slight_smile:

Can you give a testcase that shows the issue you’re having?

Edit:

Your code will throw an Exception (which is silently smothered) if the input does not contain a 7.

Edit2:

Given the testcase

1
13
1 2 3 4 5 6 7 6 5 4 3 2 1

(which should output yes), subString1 and compare are not the same string - can you see why?

1 Like