@@ -0,0 +1,980 @@
+/*%0A Program to reverse all words in a string.%0A */%0Apackage Strings;%0A////////////////////////////////////////////////////////////////////////////////%0Apublic class RevWordsInStr %7B%0A    //--------------------------------------------------------------------------%0A    public static void main(String args%5B%5D)%7B%0A        String inputStr=%22This is a string%22;%0A        System.out.println(%22Input String : %22+inputStr);%0A        %0A        String%5B%5D splitStr=inputStr.split(%22 %22);%0A        String outputStr=%22%22;%0A        %0A        for(int i=splitStr.length-1;i%3E=0;i--)%0A            outputStr+=splitStr%5Bi%5D+%22 %22;%0A        %0A        System.out.println(%22Output String : %22+outputStr);%0A    %7D%0A    //--------------------------------------------------------------------------%0A%7D%0A////////////////////////////////////////////////////////////////////////////////%0A////////////////////////////////////////////////////////////////////////////////%0A/*%0AOUTPUT :%0AInput String : This is a string%0AOutput String : string a is This %0A*/

Program to reverse all words in a given string