Search the API for THE string function String.endsWith() and compare them(Edith THE equals)
If you juist want to compare you dan compare substrings like this:

...