您的位置:首页 > 移动开发 > 微信开发

字符串倒续排列的小程序

2011-06-08 15:16 197 查看
public class Sort {
public static void main(String[] args) {
String str = "china";
char[] s = str.toCharArray();
int i=s.length;
String newstr="";
for (int h = i-1; h >=0; h--)
{
newstr+=s[h]+"";
}
System.out.println(newstr);
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: