写一个方法用于翻转数组
static void arr(String[] str){ String[] arr=new String[str.length]; int count=0; for (int i = str.length-1; i >=0 ; i--) { arr[count]=str[i]; count++; } for (String a:arr ) { System.out.println(a); } }
标签:count,arr,java,String,数组,str,翻转 From: https://www.cnblogs.com/mams/p/17089071.html