/* 需求:把字符串的首字母转成大写,其余为小写
*
* /
public class StringTest {
public static void main(String[] args) {
String s = "helloWorld";
String s1 = s.substring(1, 1);
String s2 = s.substring(1);
String s3 = s1.toUpperCase().concat(s2.toLowerCase());
System.out.println(s3);
}
|