将数组元素倒序排列

    技术2022-07-14  75

    public class Test15 { public static void main(String[] args) { int[] a = {1,3,5,4}; int temp = 0; for(int i = a.length - 1; i > a.length / 2; i--) { System.out.println(a[i]); } } } //输入:4 5 3 1
    Processed: 0.026, SQL: 9