java的倒序排列
packagecom.ui;importjava.util.Scanner;publicclasss{publicstaticvoidmain(String[]args){Strings="abcdefg";Stringt="";char[]charArray=s.toCharArray();for(inti=charArray.length-1;i>=0;i--){t=t+charArray[i];}System.out.println(t);}}
用户评论