JAVA: I cannot get all the lines of the file, File.txt, storedinto my 2D array. Only the last line of the file is stored into my2D array when I print the array at the end of the program.
Driver.java
package project1;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.Scanner;
public class Driver {
public static void main(String[] args) throwsFileNotFoundException {
String[][] array1 = new String[10][6];
String[] array11 = new String[6];
Driver obj = new Driver();
File myFile = new File(args[0]);
Scanner inFile = new Scanner(myFile);
String oneLine;
int i = 0, j = 0, k = 0 ;
while (inFile.hasNextLine()) {
oneLine = inFile.nextLine();
array11 = oneLine.split(“[, ]”);
obj.getArray(i, k, array11, array2015);
}
//return Arrays.deepToString(array1);
System.out.println(Arrays.deepToString(obj.getArray(i, k,array11, array1)));
}
public String[][] getArray(int i, int
PayPal Gateway not configured
PayPal Gateway not configured