public boolean endsWith(String suffix) |
package java like ; public class EndsWithExample { public static void main(String args[]) { String str1 = new String("This is a test String"); String str2 = new String("Test ABC"); booleanvar1 = str1.endsWith("String"); booleanvar2 = str1.endsWith("ABC"); boolean var3 = str2.endsWith("String"); boolean var4 = str2.endsWith("ABC"); System.out. print ln("str1 ends with String: " + var1); System.out. print ln("str1 ends with ABC: " + var2); System.out. print ln("str2 ends with String: " + var3); System.out. print ln("str2 ends with ABC: " + var4); } } |
str1 ends with String: true str1 ends with ABC: false str2 ends with String: false str2 ends with ABC: true |
package java like ; public class Test3 { public static void main(String[] args) { String str = "Learn Java Programming with examples"; System.out. print ln("str ends with <<examples>> " + str.endsWith("examples")); System.out. print ln("str ends with <<with examples>> " + str.endsWith("with examples")); System.out. print ln("str ends with <<ples>> " + str.endsWith("ples")); System.out. print ln("str ends with <<exam>> " + str.endsWith("exam")); System.out. print ln("str ends with <<Learn>> " + str.endsWith("Learn")); System.out. print ln("str ends with <<Java Programming>> " + str.endsWith("Java Programming")); System.out. print ln("str ends with <<s>> " + str.endsWith("s")); System.out. print ln("str ends with <<ple>> " + str.endsWith("ple")); } } |
str ends with <<examples>> true str ends with <<with examples>> true str ends with <<ples>> true str ends with <<exam>> false str ends with <<Learn>> false str ends with <<Java Programming>> false str ends with <<s>> true str ends with <<ple>> false |
دوره های آموزشی برنامه نویسی
انجام پروژه های برنامه نویسی
تدریس خصوصی برنامه نویسی
بیش از 7 سال از فعالیت جاواپرو میگذرد
جاواپرو دارای مجوز نشر دیجیتال از وزارت فرهنگ و ارشاد اسلامی است
جهت ارتباط مستقیم با جاواپرو در واتساپ و تلگرام :
09301904690