题目详情
单选题 读程,判断程序的输出是什么? class LowHighSwap { static void doIt( int[] z ) { int temp = z[z.length-1]; z[z.length-1] = z[0]; z[0] = temp; } } class TestIt { public static void main( String[] args ) { int[] myArray = {1, 2, 3, 4, 5}; LowHighSwap.doIt(myArray); for (int i = 0; i < myArray.length; i++) { System.out.print(myArray[i] + " "); } } }

学科:Java编程及应用
时间:2023-11-08 15:11:49
