1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Importing Data in Java

Connected

अभ्यास

Reading files with BufferedReader

As your work continues, the company has started receiving larger market data files. Your manager has suggested using Java I/O streams for better efficiency. As a first step, you need to implement a solution that reads the first few lines of a CSV file using a character stream.

The BufferedReader and FileReader classes have been imported for you.

निर्देश

100 XP
  • Create a reader using chained constructors passing filePath to the FileReader.
  • Read and print the header line.
  • Read and print the first data row.