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.
Signature
The syntax or signature of endsWith() method is given below.
Parameter
suffix : Sequence of character
Returns
true or false
Java String endsWith() method example
Output:
true true
No comments:
Post a Comment