package com.lovcoding.day06;

import java.util.Arrays;
import java.util.Scanner;

public class TestArr03_Revers {
    //方式1
    public static void main(String[] args) {

        int[] arr = {1,3,5,6,8,9,11,14,16,18,19,22,25,27,28,29,35,46,57,67,78,98};

        //反转
        for (int i = 0; i < arr.length/2; i++) {
            //交换
            int temp = arr[i];
            arr[i] = arr[arr.length-1 -i];
            arr[arr.length-1 -i] = temp;
        }

        System.out.println(Arrays.toString(arr));
    }
}
