日期:2014-05-20 浏览次数:20648 次
import java.util.Scanner; public class Reverse { public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("pLease in put a number:"); int number=sc.nextInt(); StringBuffer sb=new StringBuffer(""+number); sb.reverse(); System.out.println(sb.toString()); } }
------解决方案--------------------
int a[] = {3,2,4,5,6};
int b[] = new b[5];
for(int i=0;i<a.length;i++){
b[i] = a[a.length-1];
}
这样应该就可以了