本帖最后由 syw02014 于 2014-3-7 20:18 编辑  
- class CollectionsDemo
 
 - {
 
 -         public static void main(String[]args)
 
 -         {
 
 -                 int[]arr={3,1,3,4,1,2,3,0,9,6,4,5,3};
 
 -                 dayin(arr);
 
 -         }
 
 -         public static void dayin(int[] arr )
 
 -         {        char[]chs={'零','一','二','三','四','五','六','七','八','九'};//'零'后不能为中文逗号
 
 -                 for(int x=0;x<arr.length ;x++ )//x未定义
 
 -                 {
 
 -                         int temp=arr[x];
 
 -                         System.out.print(chs[temp]);//不换行输出
 
 -                 }
 
  
 
-         }
 
 - }
 
  复制代码 
 
上面程序的结果: 
三一三四一二三零九六四五三 
 |