java endsWith

The endsWith() method is a built-in method in Java that checks whether a string ends with a specified suffix. It returns a boolean value of true if the string ends with the specified suffix, and false otherwise.

The syntax of the endsWith() method is as follows:

boolean endsWith(String suffix)

Here, suffix is the string that is to be checked as the suffix in the original string. This method is case-sensitive.

Example usage:


String str1 = "Hello, World!";
boolean ends1 = str1.endsWith("World!"); // true
String str2 = "Hello, World!";
boolean ends2 = str2.endsWith("world!"); // false (case-sensitive)
String str3 = "Hello, World!";
boolean ends3 = str3.endsWith("ello"); // true (partial match at end)
String str4 = "Hello, World!";
boolean ends4 = str4.endsWith("Hello"); // false (not at the end)

In the above examples, the endsWith() method is used to check whether the given suffix exists at the end of the original string.

主站蜘蛛池模板: 国模精品一区二区三区| 日韩精品无码一区二区三区不卡| 午夜一区二区在线观看| 日本一区二区三区精品国产 | 亚洲A∨精品一区二区三区| 国产一区二区在线看| 精品福利一区3d动漫| 亚洲视频一区在线播放| 国产亚洲无线码一区二区| 无码丰满熟妇浪潮一区二区AV| 久99精品视频在线观看婷亚洲片国产一区一级在线 | 国产一区高清视频| 国产成人精品一区二三区熟女| 精品久久久久中文字幕一区| 亚洲中文字幕一区精品自拍| 中日av乱码一区二区三区乱码| 天堂一区二区三区在线观看| 日韩一区二区视频在线观看| 国产精品乱码一区二区三| 精品无码成人片一区二区98| 一区二区中文字幕在线观看| 麻豆精品久久久一区二区| 无码视频一区二区三区| 国产精品久久久久一区二区三区 | 精品国产日韩亚洲一区| 在线欧美精品一区二区三区| 精品国产香蕉伊思人在线在线亚洲一区二区| 色狠狠色噜噜Av天堂一区| 无码中文字幕人妻在线一区二区三区 | 亚洲av成人一区二区三区在线播放 | 欧洲精品一区二区三区在线观看| 极品少妇一区二区三区四区| 亚洲一区二区三区四区在线观看| 成人精品一区二区电影| 老熟妇高潮一区二区三区| 久久久久人妻一区二区三区vr | 久久精品一区二区三区中文字幕| 综合一区自拍亚洲综合图区| 怡红院一区二区在线观看| 无码人妻精品一区二区三区99性| 人妻无码视频一区二区三区 |