题目要求 比如 This is a program.
要转换成 This Is A Program.
而我的只能是 This is a program
String first=str.substring(0,1).toUpperCase();
String rest=str.substring(1,str.length()).toLowerCase();
String newstr=new StringBuffer(first).append(rest).toString();
我的代码这样的肯定不行的,怎么像上面一样将每个空格后的都转为大写?