53、把任意字符串的首字母转成大写,其余为小写 "AdaaaxxccjDDqqql"。

@53、把任意字符串的首字母转成大写,其余为小写 “AdaaaxxccjDDqqql”。wn编辑器

	public class Test53 {
	public static void main(String[] args) {
		String s = "xxccjDDqqql";
		String substring2 = s.substring(0, 1);
		String substring = s.substring(1);
		System.out.println(substring);
		System.out.println("-------");
		String upperCase = substring2.toUpperCase();
		System.out.print(upperCase);
		String lowerCase = substring.toLowerCase();
		System.out.println(lowerCase);
				
	}
	}
	```

猜你喜欢

转载自blog.csdn.net/Marion158/article/details/85238000
今日推荐