public String trim() ------去掉字符前后的空格

public String toUperCase() ------将小写转成大写

public boolean endWith(String str) ------判断字符串是否以str结尾

public static void main(String[] args) {

String content2="Hello World";
//7.trim();去掉字符串前后的空格

System.out.println(content2.trim());


//8.toUpperCase();把小写转成大写
System.out.println(content2.toUpperCase(Locale.ROOT));
//toLowerCase();把大写转成小写
System.out.println(content2.toLowerCase(Locale.ROOT));


//9.endWith(str);判断是否以str结尾,
String filename="hello.java";
System.out.println(filename.endsWith(".java"));
// startWith(str)判断是否以str开头
System.out.println(filename.startsWith("hello"));

}