reading in csv file and storing in arrays <p>the practice question i got says that i need to</p> <p>create a java code that reads in csv file with name and height. </p> <p>to read a file you must get a file name from user as string. </p> <p>then you must store contents of file into two arrays one for name (string) and height(real number).</p> <p>You should read the file at least twice, once to check how many students are in the file (so you know how many students you need to store) and a couple more times to actually read the file (to get the names and height).</p> <p>then prompt the user for name you want height of. it should output the height for userinput.</p> <p>example csv file is </p> <p>chris,180</p> <p>jess,161</p> <p>james, 174</p> <p>its not much but this is all i could come up with i have no idea how to store name and height separately and use that array to output the results. and would i need to use split somewhere in the code? i remember learning it but dont know if its used in this situation</p> <pre><code>import.java.util.*; private class StudentNameHeight private void main (string [] args) { String filename; Scanner sc = new scanner(system.in); System.out.println("enter file name") filename = sc.nextline(); readFile (filename); } private void readFile (String filename) { FileInputStream fileStrm = null; InputStreamReader rdr; BufferedReader bufRdr; try { fileStrm = new FileInputStream(filename); rdr = new InputStreamReader(fileStrm); bufRdr = new BufferedReader(rdr); // ? catch (IOException e) { if (fileStrm != null) { try {fileStrm.close(); } catch (IOException e2){} } System.out.println("error in processing" + e.getMessage()); } } </code></pre> <p>im new to java so, any small tip or help would be great </p> <p>thanks</p>