Java程序用于反转字符串中的每个单词 Java将字符串中的每个单词tOGGLE Java String substring()方法示例。 Java程序用于反转字符串中的每个单词 import java.lang.*; public class StringBufferDemo { public static void main(String[] args) { StringBuffer buff = new StringBuffer("tutorials point"); System.out.println("buffer = " + buff); // reverse characters of the buffer and prints it System.out.println("reverse = " + buff.reverse()); // reverse of the buffer is equivalent to the actual buffer buff = new StringBuffer("malyalam"); System.out.println("buffer = " + buff); // reverse characters of the buffer and prints it System.out.println("reverse = " + buff.reverse()); } } Java将字符串中的每个单词tOGGLE Java String substring()方法示例。