public String print(String s){
String ch = " ";
for (int i = s.length()-1; i >= 0; i--) {
ch += s.charAt(i);
}
return ch;
}
public String stringReverse(String s){
StringBuilder sb = new StringBuilder(s);

sb.reverse();
String s1 = sb.toString();
return s1;
}
}
posted on 2022-01-16 19:08    阅读(35)  评论(0编辑  收藏  举报