startsWith method:
Note: startsWith() method is used to detect whether the string starts with the specified prefix.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Running result:
The strings that meet the conditions are
53011198902280308
53011197701328291
The ID cards whose first three characters are '530' are: 2 indivual
The above is the detailed content of What is the use of startsWith method in java. For more information, please follow other related articles on the PHP Chinese website!