We can also find out if a string ends with a specific value or, in other words, has a specific suffix.

Great! Unsurprisingly, endsWith() returns true or false, based on whether or not the specified String-type value is a suffix of the string.

Psst: Maria Sklodowska, who is better known as Marie Curie, won two Nobel Prizes for her pioneering work on radioactivity.

Didn't we want to check for a suffix rather than a prefix?