This commit is contained in:
2022-11-16 11:36:13 -06:00
parent ef1576c36b
commit 6e2805fed3
13 changed files with 411 additions and 1 deletions

Binary file not shown.

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.calebfontenot</groupId>
<artifactId>lab16_arrays2_CalebFontenot</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<exec.mainClass>com.calebfontenot.lab16_arrays2_calebfontenot.Lab16_arrays2_CalebFontenot</exec.mainClass>
</properties>
</project>

View File

@@ -0,0 +1,26 @@
/*
* 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 i = 1; i < ar.length; ++i) {
ar[i-1] = ar[i];
ar[ar.length - 1] = temp;
for (int value: ar) {
System.out.println(value + " ");
}
}
}
}

View File

@@ -0,0 +1,17 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Project/Maven2/JavaApp/src/main/java/${packagePath}/${mainClassName}.java to edit this template
*/
package com.calebfontenot.lab16_arrays2_calebfontenot;
/**
*
* @author caleb
*/
public class Lab16_arrays2_CalebFontenot {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}