package com.tets;
public class Demo2 {
public static void main(String[] args){ String str="Hello world"; String str2="hello world"; int len=str.length(); boolean b=str.startsWith("H"); boolean c=str2.contains("Hello"); boolean d=str2.endsWith("d"); System.out.println("字符串的长度是"+len);System.out.println(b+c+d);
}}