我是靠谱客的博主 迅速帅哥,这篇文章主要介绍Java String startsWith()方法与示例,现在分享给大家,希望可以做个参考。

字符串startsWith()方法 (String startsWith() Method)

startsWith() method is a String class method, it is used to check whether a given string starts with specific character sequences or not.

startsWith()方法是一个String类方法,用于检查给定的字符串是否以特定的字符序列开头。

If a string starts with given character sequences – startsWith() method returns true, if a string does not start with the given character sequences – startsWith() method returns false.

如果字符串以给定的字符序列开头-startsWith()方法将返回true ,如果字符串不是以给定的字符序列开头-则startsWith()方法将返回false 。

Syntax:

句法:

    boolean String_object.startsWith(character_sequence);

最后

以上就是迅速帅哥最近收集整理的关于Java String startsWith()方法与示例的全部内容,更多相关Java内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(107)

评论列表共有 0 条评论

立即
投稿
返回
顶部