CS1073/Submissions/CS1073 As11/IsaacShoebottom_As11_Archive/Sourrce Code/IntArrayUtilDriver.java

22 lines
782 B
Java
Raw Permalink Normal View History

2022-10-07 00:22:46 -03:00
import java.util.Arrays;
public class IntArrayUtilDriver {
public static void main(String[] args) {
int[] array1 = {1, 4 ,9, 16};
int[] array2 = {9, 7, 4, 9 ,11};
int[] array3 = IntArrayUtil.append(array1, array2);
System.out.println("These are the original strings");
System.out.println(Arrays.toString(array1));
System.out.println(Arrays.toString(array2));
System.out.println(Arrays.toString(array3));
System.out.println("These are the modified strings");
System.out.println(Arrays.toString(IntArrayUtil.append(array1, array2)));
System.out.println(Arrays.toString(IntArrayUtil.reverse(array3)));
System.out.println(IntArrayUtil.alternatingSum(array3));
}
}