I'm trying to do an assignment where we take data from a csv file and store it in arrays. Although I'm confident in being able to parse the lines and scan them into arrays, I cannot for the life of me figure out how to get the program to connect to the file. My professor wrote down something like
private String filename = "censusData";
private File file = new File(censusdata.csv);
But every time I try and use that, it says there's a symbol error and it can't find a variable censusdata. I'm using BlueJ. Is there some way I can add the file itself to my project and then access it? I just need the program to be able and read the file line by line so I can put the data into variables.