/home/caleb/ASDV-Java/Assignments/lab16_arrays2_CalebFontenot/src/main/java/com/calebfontenot/lab16_arrays2_calebfontenot/ArrayShift1.java

    /*
     * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
     * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
     */
    package com.calebfontenot.lab16_arrays2_calebfontenot;

    /**
     *
     * @author caleb
     */
    public class ArrayShift1 {

        public static void main(String[] args)
        {
            int[] ar = {1, 2, 3, 4, 5};
            int temp = ar[0];
            for (int value : ar) {
                System.out.print(value + " ");
            }
            System.out.println();

            for (int i = 1; i < ar.length; ++i) {
                ar[i - 1] = ar[i];
            }
            ar[ar.length - 1] = temp;

            for (int value : ar) {
                System.out.print(value + " ");
            }
        }
    }