View Single Post
  #2 (permalink)  
Old 08-01-2007, 09:21 PM
yiweiang yiweiang is offline
Member
 
Join Date: Aug 2007
Posts: 15
yiweiang is on a distinguished road
Let me see if i've got your question right. You have one string and you just want to flip it over.
public class StringFlip
{
public static void main(String Args[])
{
String a="abcde";
String b="";

for(int x=a.length();x>0; x--)
{
b=b+a.substring(x-1,x);
}

System.out.println(b);
}
}

Tell me if this is what you are looking for.
Reply With Quote