Posted on 2008-02-26 09:11
KAY 阅读(4435)
评论(3) 编辑 收藏
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class ReveserOrder {
public void order() throws IOException {
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str = br.readLine();
char c[] = str.toCharArray();
int i = str.length();
i--;
char temp;
for (int j = 0; j < i; j++, i--) {
temp = c[j];
c[j] = c[i];
c[i] = temp;
}
System.out.println(new String(c, 0, str.length()));
}
public static void main(String[] args) throws IOException {
new StringTest().order();
}
}