Here is the CSV file I am using:
B00123,55
B00783,35
B00898,67
I need to read and store the first value entered in the file e.g. B00123 and store it into an array. A user can add to the file so it is not a fixed number of records.
So far, I have tried this code:
public class ArrayReader 
{
    static String xStrPath;
    static double[][] myArray;
    static void setUpMyCSVArray()
    {
        myArray = new double [4][5];
        Scanner scanIn = null;
        int Rowc = 0;
        int Row = 0;
        int Colc = 0;
        int Col = 0;
        String InputLine = "";
        double xnum = 0;
        String xfileLocation;
        xfileLocation = "src\\marks.txt";
        System.out.println("\n****** Setup Array ******");
        try
        {
            //setup a scanner
            /*file reader uses xfileLocation data, BufferedRader uses 
              file reader data and Scanner uses BufferedReader data*/
            scanIn = new Scanner(new BufferedReader(new FileReader(xfileLocation)));
            while (scanIn.hasNext())
            {              
                //read line form file
                InputLine = scanIn.nextLine();
                //split the Inputline into an array at the comas
                String[] InArray = InputLine.split(",");
                //copy the content of the inArray to the myArray
                for (int x = 0; x < myArray.length; x++)
                {
                    myArray[Rowc][x] = Double.parseDouble(InArray[x]);
                }
                //Increment the row in the Array
                Rowc++;
            }
        }
        catch(Exception e)
        {
        }
        printMyArray();
    }
    static void printMyArray()
    {
        //print the array
        for (int Rowc = 0; Rowc < 1; Rowc++)
        {
            for (int Colc = 0; Colc < 5; Colc++)
            {
                System.out.println(myArray[Rowc][Colc] + " ");
            }
            System.out.println();
        }
        return;
    }
    public static void main(String[] args)
    {
        setUpMyCSVArray();
    }
}
This loops round the file but doesn't not populate the array with any data. The outcome is:
****** Setup Array ******
[[D@42a57993
0.0 
0.0 
0.0 
0.0 
0.0 






InputLinevalue eg. , btw due java convention, naming is camel-case starting with small case, so it should be named likeinputLine