A simple Java project that demonstrates how to read employee data from a CSV file using three different approaches.
- Read CSV files using Scanner
- Read CSV files using BufferedReader
- Read CSV files using OpenCSV
- Parse employee records and display them in the console
- Compare different file-reading techniques
- Java
- OpenCSV
- Maven
- IntelliJ IDEA
src/
├── main/
│ ├── java/
│ │ ├── Way1BufferedReader.java
│ │ ├── Way2Scanner.java
│ │ └── Way3OpenCsv.java
│ └── resources/
│ └── employees.csv
Uses the Scanner class to read CSV data line by line.
Uses BufferedReader for efficient file reading and manual parsing using the split() method.
Uses the OpenCSV library to simplify CSV parsing and handle CSV records efficiently.
id,name,email,phone,city,salary
1,Srinivas,srinivas@gmail.com,9876543210,Hyderabad,50000
2,Ravi,ravi@gmail.com,9876543211,Bengaluru,55000- Java File Handling
- Working with CSV files
- Exception Handling
- External Library Integration
- Maven Dependency Management
Srinivas Dappu