Java String startsWith
The java string startsWith() method checks if this string starts with given prefix. It returns true if this string starts with given prefix else returns false.
Signature
The syntax or signature of startWith() method is given below.
Parameter
prefix : Sequence of character
Returns
true or false
Java String startsWith() method example
Output:
true true
No comments:
Post a Comment