编写一个程序,将下面的一段文本中的各个单词的字母顺序翻转
“To be or not to be",将变成"oT eb ro ton ot eb"。
public class Test_7_3 {
public static void main(String[] args) {
String m = "To be or not to be";
String[] words = m.split(" ");
StringBuilder result = new StringBuilder();
for(String word:words)
result.append(new StringBuffer(word).reverse().toString()).append(" ");
System.out.println(result);
}
}