Reading or writing a CSV file is a very common use-case that Java developers encounter in their day-to-day work.
If you need a simple way to read a CSV file or generate a new one for your project then this blog post is for you.
In this post, You’ll learn how to read and write CSV files in Java using a very simple open source library called Apache Commons CSV.
First of all, you need to add apache-commons-csv dependency in your project. If you use maven, then add the following dependency to your pom.xml file -