标签:http 学习 x64 clip package rgs src 字符 blog
os :windows7 x64
jdk:jdk-8u131-windows-x64
ide:Eclipse Oxygen Release (4.7.0)
code:
package jizuiku.t02;
public class Demo02 {
public static void main(String[] args) {
String s1 = "World Hello";
String s2 = "hello";
String s3 = "Hello";
String s4 = "HellW";
System.out.println(s1.endsWith(s2));
System.out.println(s1.endsWith(s3));//"World Hello" 以 "Hello"作为结尾
System.out.println(s2.endsWith(s1));
System.out.println(s3.endsWith(s4));
}
}
result:
Java优秀,值得学习。
学习资源:API手册+Java源码。
JavaSE8基础 String endsWith 判断A字符串是否以B字符串作为结束
标签:http 学习 x64 clip package rgs src 字符 blog
原文地址:http://www.cnblogs.com/jizuiku/p/7468986.html