public class Java01 {
public static void main(String[] args) {
// String 增强
//判断字符串是否为空
boolean a = " ".isBlank();//true
System.out.println(a);
//去除字符串首尾空格
String b = " Java ".strip();// "Java"
System.out.println(b);
//去除字符串首部空格
String c = " Java ".stripLeading(); ??// "Java "
System.out.println(c);
//去除字符串尾部空格
String d = " Java ".stripTrailing(); ?// " Java"
System.out.println(d);
//重复字符串多少次
String e = "Java".repeat(3); ????????????// "JavaJavaJava"
System.out.println(e);
//返回由行终止符分隔的字符串集合。
long f = "A\nB\nC".lines().count();// 3
System.out.println(f);
List<String> collect = "A\nB\nC".lines().collect(Collectors.toList());
collect.forEach(System.out::println);
}
}