Java String endsWith()The java string endsWith() method checks if this string ends with given suffix. It returns true if this string ends with given suffix else returns false. Internal implementationSignatureThe syntax or signature of endsWith() method is given below. Parametersuffix : Sequence of character Returnstrue or false Java String endsWith() method exampleOutput: true true Java String endsWith() Method Example 2Output: false String ends with .com Next TopicJava String equals()
|