public class StringFormatter {public static String reverseWord(String str){String words[]=str.split(“\\s”);String reverseWord=””;for(String w:words){StringBuilder sb=new StringBuilder(w);sb.reverse();reverseWord+=sb.toString()+” “;
How do you reverse words in Word?
- Insert a text box in your document by selecting Insert > Text Box, and then type and format your text.
- Right-click the box and select Format Shape.
- In the Format Shape dialog box, select 3-D Rotation on the left.
- In the X box, enter 180°. Notes:
How do you reverse a string?
- public class Reverse.
- {
- public static void main(String[] args) {
- String string = “Dream big”;
- //Stores the reverse of given string.
- String reversedStr = “”;
- //Iterate through the string from last and add each character to variable reversedStr.
- for(int i = string.length()-1; i >= 0; i–){