I
want to share how to Comparing the beginning and end of a string. You can use this code
but if you copy this code and paste in your blog/website, please insert this
link of article.
System.out.println(str1.startsWith("Hello")); //true
System.out.println(str1.startsWith("Ello",1)); //false
System.out.println(str1.endsWith("Java")); //true
0 komentar:
Posting Komentar