Java Tutorial for Beginners C02L05 BufferedReader and CSV files


Video is ready, Click Here to View ×

Hello everyone, in this tutorial we are going to be looking at how to take in data from a CSV (comma separated values table) into our program ready for processing. We also learn how to throw exceptions (do not throw exceptions if you can help it, instead go to my 11th tutorial to learn how to handle exceptions properly)

11 thoughts on “Java Tutorial for Beginners C02L05 BufferedReader and CSV files

  1. Thank you you for the very informative clip. How would one go about parsing parallel class level arrays into appropriate data types? I searched for the more complicated csv file tutorials you mentioned (9:46) but was unable to find any in your channel. Cheers

  2. @DarthSatoris So if I am reading this right you want to store your values something like this:

    9002,myPassword,myServer and then parse this into an array as i have shown you above then use the values to set up a server connection using jdbc? If this is the case then yes you could do it like this. You may also want to have a look at Spring injection which is how I deal with this issue.

  3. In case I want to use a text file to store values for an SQL server connection, (port number, password, SQL server name, etc.), would I be doing just like this and insert the values from the arraylist in the required places? like ds.setServerName("ArrayList.get(0)");


  4. @fokyoz Well I close it because it is good practice to close streams as soon as you are done with them but I have had instances where errors have occurred due to me not closing the stream. In this case the stream being left open is not an efficient use of our resources so closing it releases resources for future use. I advocate people trying these things out if only to experience the pains of not following best practices 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *