标签:code length for class col system span i++ sys
java的api没用翻转数组的工具类,只能自己写了。
int [] testIntArr = {1,2,3}; //翻转数组 for (int i = 0; i < testIntArr.length / 2; i++) { Object temp = testIntArr[i]; testIntArr[i] = testIntArr[testIntArr.length - 1 - i]; testIntArr[testIntArr.length - 1 - i] = (int) temp; } for (int i = 0; i < testIntArr.length; i++) { System.out.println(testIntArr[i]); // 321 }
标签:code length for class col system span i++ sys
原文地址:https://www.cnblogs.com/luguankun/p/10432249.html