Thanks in advance! I have been working on this for hours and can't seem to get it right. I added the directions as an attachment. I can't seem to get B working. any ideas as to how to fix it? thanks!
import java.util.Scanner; public class OutsideLab5 { public static Scanner sc=new Scanner(System.in); public static void main(String[] args) { System.out.println(createArithmeticSeq()); matricize(new int [16], new int [4][4]); } public static String createArithmeticSeq() { int first, second; int[] arrayA=new int[16]; first=0; second=0; System.out.println("Please input two numbers. \n The second will be subtracted \n from the first."); System.out.print("Please input the first number: "); first=sc.nextInt(); arrayA[0]=first; System.out.print("Please input the second number: "); second=sc.nextInt(); for(int i=0;i < 15;i++) { arrayA[i+1]=arrayA[i]+second; } for(int i=0;i<16;i++) { System.out.print(arrayA[i]+" "); } return ""; } public static String matricize(int arrayB[], int arrayC[][]) { for(int i=0;i<4;i++) { for(int j=0;j<4;j++) { arrayC[i][j]=arrayB[i*4+j]; arrayB=new int[16]; arrayC=new int[4][4]; } } return ""; }}