public class FanZhuan {
public static void main(String[] args) {
//運用charAt(i)实现反转
String d="abcdefg";
// for(int i=d.length()-1;i>=0;i--){
// System.out.print(d.charAt(i));
// }
char b[]=d.toCharArray();
char temp;
for(int i=0;i<b.length/2;i++){
temp=b[i];
b[i]=b[b.length-i-1];
b[b.length-i-1]=temp;
}
d=new String(b);
System.out.println(d);
}
}