//分割char数组0角标两位
char[] a ={'a','b','c','d'};
String str = new String(a,0,2);
System.out.println(str);
//字符串相加,字符串长度,索引角标,返回新字符串
String str2 =new String("hello ");
String str3 =new String("world");
System.out.println(str2+str3);
System.out.println(str2.length());
System.out.println(str2.indexOf("l"));
System.out.println(str2.lastIndexOf("l"));
System.out.println(str2.charAt(1));
String str4 =str2.substring(1);