Blogger

Delete comment from: Javarevisited

CROSSWIN said...

import java.io.*;
class split
{
public static void main(String args[])throws IOException
{
String str[];
String finalstr="";
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
str=br.readLine().split(" ");
for(int i=str.length-1;i>=0;i--)
finalstr+=str[i]+" ";
System.out.println(finalstr);
}
}

May 8, 2015, 6:49:24 AM


Posted to How to Reverse String in Java Using Iteration and Recursion - Example

Google apps
Main menu