{"id":79261,"date":"2020-07-01T09:00:09","date_gmt":"2020-07-01T03:30:09","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=79261"},"modified":"2020-07-01T09:00:09","modified_gmt":"2020-07-01T03:30:09","slug":"read-csv-file-in-java","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/","title":{"rendered":"How to Read CSV file in Java"},"content":{"rendered":"<p>In past articles, we studied how to read an excel file in Java. In this article, we will discuss how to read a CSV file in Java using different methods. The data is multiplying with time; all such data is kept in these CSV files.<\/p>\n<p>There is a need to understand the techniques to read these files using Java. We will learn all such methods in this article. So, let\u2019s start discussing this topic.<\/p>\n<h3>What is CSV file?<\/h3>\n<p>The CSV file stands for the Comma-Separated Values file. It is a simple plain-text file format that stores tabular data in columns in simple text forms, such as a spreadsheet or database, and splits it by a separator. The separator used to split the data usually is commas (,).<\/p>\n<p>We can import files in the CSV format and export them using programs like Microsoft Office and Excel, which store data in tables. The CSV file uses a delimiter to identify and separate different data tokens in a file.<\/p>\n<p>The use of the CSV file format is when we move tabular data between programs that natively operate on incompatible formats.<\/p>\n<h3>Creating CSV File<\/h3>\n<p>We can create a CSV file in the following two ways:<\/p>\n<ul>\n<li>Using Microsoft Excel<\/li>\n<li>Using Notepad editor<\/li>\n<\/ul>\n<h4>1. Using Microsoft Excel<\/h4>\n<p><strong>1:<\/strong> Open Microsoft Excel.<\/p>\n<p><strong>2:<\/strong> Write the data into the excel file:<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/pasted-image-0-20.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79285\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/pasted-image-0-20.png\" alt=\"create csv file in java\" width=\"400\" height=\"221\" \/><\/a><\/p>\n<p><strong>3:<\/strong> Save the excel file with .csv extension as shown below:<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/pasted-image-0-1-9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79286\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/pasted-image-0-1-9.png\" alt=\"save csv file in java\" width=\"683\" height=\"480\" \/><\/a><\/p>\n<h4>2. Using Notepad<\/h4>\n<p>We can also create a CSV file using Notepad with the following steps:<\/p>\n<p><strong>Step 1:<\/strong> Open Notepad editor.<\/p>\n<p><strong>Step 2:<\/strong> Write some data into file separated by comma (,).<\/p>\n<p>For example:<br \/>\n<strong>Rajat, Jain, 26, 999967439, Delhi<\/strong><\/p>\n<p><strong>Step 3:<\/strong> Save the file with .csv extension.<br \/>\nWe have created the following file.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/pasted-image-0-2-9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79287\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/pasted-image-0-2-9.png\" alt=\"CSV file in java\" width=\"824\" height=\"306\" \/><\/a><\/p>\n<h3>Ways to read CSV file in Java<\/h3>\n<p>There are the following four ways to read a CSV file in Java:<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/Ways-to-read-a-CSV-file-in-Java.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79283\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/Ways-to-read-a-CSV-file-in-Java.jpg\" alt=\"read CSV file in Java\" width=\"488\" height=\"458\" \/><\/a><\/p>\n<h4>1. Java Scanner class<\/h4>\n<p>The Scanner class of Java provides various methods by which we can read a CSV file. It provides a constructor that produces values scanned from the specified CSV file. This class also breaks the data in the form of tokens.<\/p>\n<p>There is a delimiter pattern, which, by default, matches white space. Then, using different types of next() methods, we can convert the resulting tokens.<\/p>\n<p><strong>Code to read a CSV file using a Scanner class:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import java.io. * ;\nimport java.util.Scanner;\npublic class CSVReaderDemo {\n  public static void main(String[] args) throws Exception {\n    Scanner sc = new Scanner(new File(\"C:\\\\Users\\\\Dell\\\\Desktop\\\\csvDemo.csv\"));\n    \/\/parsing a CSV file into the constructor of Scanner class \n    sc.useDelimiter(\",\");\n    \/\/setting comma as delimiter pattern\n    while (sc.hasNext()) {\n      System.out.print(sc.next());\n    }\n    sc.close();\n    \/\/closes the scanner  \n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Mr., Raju, Dixit, 3603286012, Burdwan<br \/>\nMr., Joseph, Patil, 4645968519, Hoogly<br \/>\nMr., Andrew, Mukherjee, 9067215139, Burmingham<br \/>\nMr., Varun, Patel, 2503595381, Sindh<br \/>\nMr., Michael, Baldwin, 7631068844, Kentucky<br \/>\nMr., Emmanuel, Agarwal, 3538037535, Nice<br \/>\nMr., Sumeet, Patil, 6871075256, Aukland<br \/>\nMr., Pranab, Kulkarni, 7982264359, Hubli<br \/>\nMr., Rajeev, Singh, 3258837884, Patiala<br \/>\nMr., Sujay, Kapoor, 5127263160, Mumbai<\/div>\n<h4>2. Java String.split() method<\/h4>\n<p>The String.split() of Java identifies the delimiter and split the rows into tokens.<\/p>\n<p><strong>The Syntax of this method is:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">public String[] split(String regex)<\/pre>\n<p><strong>Code to read a CSV file using String.split() method:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import java.io. * ;\npublic class CSVReader {\n  public static final String delimiter = \",\";\n  public static void read(String csvFile) {\n    try {\n      File file = new File(csvFile);\n      FileReader fr = new FileReader(file);\n      BufferedReader br = new BufferedReader(fr);\n      String line = \" \";\n      String[] tempArr;\n      while ((line = br.readLine()) != null) {\n        tempArr = line.split(delimiter);\n        for (String tempStr: tempArr) {\n          System.out.print(tempStr + \" \");\n        }\n        System.out.println();\n      }\n      br.close();\n    }\n    catch(IOException ioe) {\n      ioe.printStackTrace();\n    }\n  }\n  public static void main(String[] args) {\n    \/\/csv file to read\n    String csvFile = \"C:\\\\Users\\\\Dell\\\\Desktop\\\\csvDemo.csv\";\n    CSVReader.read(csvFile);\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Mr., Raju, Dixit, 3603286012, Burdwan<br \/>\nMr., Joseph, Patil, 4645968519, Hoogly<br \/>\nMr., Andrew, Mukherjee, 9067215139, Burmingham<br \/>\nMr., Varun, Patel, 2503595381, Sindh<br \/>\nMr., Michael, Baldwin, 7631068844, Kentucky<br \/>\nMr., Emmanuel, Agarwal, 3538037535, Nice<br \/>\nMr., Sumeet, Patil, 6871075256, Aukland<br \/>\nMr., Pranab, Kulkarni, 7982264359, Hubli<br \/>\nMr., Rajeev, Singh, 3258837884, Patiala<br \/>\nMr., Sujay, Kapoor, 5127263160, Mumbai<\/div>\n<h4>3. Using BufferedReader class in Java<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import java.io.BufferedReader;\nimport java.io.FileReader;\nimport java.io.IOException;\npublic class CSV {\n  public static void main(String[] args) {\n    String line = \"\";\n    String splitBy = \",\";\n    try {\n      \/\/parsing a CSV file into BufferedReader class constructor  \n      BufferedReader br = new BufferedReader(new FileReader(\"C:\\\\Users\\\\Dell\\\\Desktop\\\\csvDemo.csv\"));\n      while ((line = br.readLine()) != null)\n      \/\/returns a Boolean value  \n      {\n        String[] employee = line.split(splitBy);\n        \/\/use comma as separator  \n        System.out.println(\"Emp[First Name=\" + employee[1] + \", Last Name=\" + employee[2] + \", Contact=\" + employee[3] + \", City= \" + employee[4] + \"]\");\n      }\n    }\n    catch(IOException e) {\n      e.printStackTrace();\n    }\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Emp[First Name= Raju, Last Name= Dixit, Contact= 3603286012, City= Burdwan]<br \/>\nEmp[First Name=Joseph, Last Name=Patil, Contact= 4645968519, City= Hoogly]<br \/>\nEmp[First Name=Andrew, Last Name=Mukherjee, Contact= 9067215139, City= Burmingham]<br \/>\nEmp[First Name=Varun, Last Name=Patel, Contact= 2503595381, City= Sindh]<br \/>\nEmp[First Name=Michael, Last Name=Baldwin, Contact= 7631068844, City= Kentucky]<br \/>\nEmp[First Name=Emmanuel, Last Name=Agarwal, Contact= 3538037535, City= Nice]<br \/>\nEmp[First Name=Sumeet, Last Name=Patil, Contact= 6871075256, City= Aukland]<br \/>\nEmp[First Name=Pranab, Last Name=Kulkarni, Contact= 7982264359, City= Hubli]<br \/>\nEmp[First Name=Rajeev, Last Name=Singh, Contact= 3258837884, City= Patiala]<br \/>\nEmp[First Name=Sujay, Last Name=Kapoor, Contact= 5127263160, City= Mumbai]<\/div>\n<h4>4. Using OpenCSV API in Java<\/h4>\n<p>OpenCSV API is a third party API. This API provides standard libraries to read various versions of the CSV file. The OpenCSV API also offers better control to handle the CSV files. This library can also read Tab-Delimited File or TDF file format.<\/p>\n<h4>Features of Java OpenCSV API<\/h4>\n<ul>\n<li>Can read Any number of values per line.<\/li>\n<li>Avoids commas in quoted elements.<\/li>\n<li>Can handle entries that span multiple lines.<\/li>\n<\/ul>\n<p>We use the CSVReader class to read a CSV file. The class CSVReader provides a constructor to parse a CSV file.<\/p>\n<p><strong>Steps to read Java CSV file in eclipse:<\/strong><\/p>\n<p><strong>1:<\/strong> Create a class file with the name CSVReaderDemo and write the following code.<br \/>\n<strong>2:<\/strong> Create a lib folder in the project.<br \/>\n<strong>3:<\/strong> <a href=\"https:\/\/repo1.maven.org\/maven2\/com\/opencsv\/opencsv\/3.8\/opencsv-3.8.jar\">Download opencsv-3.8.jar<\/a><br \/>\n<strong>4:<\/strong> Copy the opencsv-3.8.jar and paste into the lib folder.<br \/>\n<strong>5:<\/strong> Run the program.<\/p>\n<p><strong>Code to read a CSV file using OpenCSV API:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import java.io.FileReader;\nimport com.opencsv.CSVReader;\npublic class CSVReaderDemo {\n  public static void main(String[] args) {\n    CSVReader reader = null;\n    try {\n      \/\/parsing a CSV file into CSVReader class constructor  \n      reader = new CSVReader(new FileReader(\"C:\\\\Users\\Dell\\Desktop\\csvDemo.csv\"));\n      String[] nextLine;\n      \/\/reads one line at a time  \n      while ((nextLine = reader.readNext()) != null) {\n        for (String token: nextLine) {\n          System.out.print(token);\n        }\n        System.out.print(\"\\n\");\n      }\n    }\n    catch(Exception e) {\n      e.printStackTrace();\n    }\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Mr. Raju Dixit 3603286012 Burdwan<br \/>\nMr. Joseph Patil 4645968519 Hoogly<br \/>\nMr. Andrew Mukherjee 9067215139 Burmingham<br \/>\nMr. Varun Patel 2503595381 Sindh<br \/>\nMr. Michael Baldwin 7631068844 Kentucky<br \/>\nMr. Emmanuel Agarwal 3538037535 Nice<br \/>\nMr. Sumeet Patil 6871075256 Aukland<br \/>\nMr. Pranab Kulkarni 7982264359 Hubli<br \/>\nMr. Rajeev Singh 3258837884 Patiala<br \/>\nMr. Sujay Kapoor 5127263160 Mumbai<\/div>\n<h3>Reading Java CSV file with a different separator<\/h3>\n<p>We can also read a file using a different delimiter. In the following CSV file, we have created a CSV file using a semicolon (;) to separate tokens.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/pasted-image-0-2-10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79288\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/pasted-image-0-2-10.png\" alt=\"reading csv in java\" width=\"824\" height=\"306\" \/><\/a><\/p>\n<p><strong>Code to read a CSV file with different delimiters:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import java.io.FileReader;\nimport java.io.IOException;\nimport com.opencsv.CSVReader;\npublic class CSV {\n  public static void main(String[] args) {\n    CSVReader reader = null;\n    try {\n      reader = new CSVReader(new FileReader(\"C:\\\\Users\\\\Dell\\\\Desktop\\\\csvDemo.csv\"));\n      String[] nextLine;\n      \/\/read one line at a time  \n      while ((nextLine = reader.readNext()) != null) {\n        for (String token: nextLine) {\n          System.out.println(token);\n        }\n        System.out.print(\"\\n\");\n      }\n    }\n    catch(Exception e) {\n      e.printStackTrace();\n    }\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">Mr.; Raju; Dixit; 3603286012; Burdwan<br \/>\nMr.; Joseph; Patil; 4645968519; Hoogly<br \/>\nMr.; Andrew; Mukherjee; 9067215139; Burmingham<br \/>\nMr.; Varun; Patel; 2503595381; Sindh<br \/>\nMr.; Michael; Baldwin; 7631068844; Kentucky<br \/>\nMr.; Emmanuel; Agarwal; 3538037535; Nice<br \/>\nMr.; Sumeet; Patil; 6871075256; Aukland<br \/>\nMr.; Pranab; Kulkarni; 7982264359; Hubli<br \/>\nMr.; Rajeev; Singh; 3258837884; Patiala<br \/>\nMr.; Sujay; Kapoor; 5127263160; Mumbai<\/div>\n<h3>Conclusion<\/h3>\n<p>In this Java tutorial, we have learned different ways to read CSV file in Java. We can use any one of the three methods to read Java CSV file. Java OpenCSV API is an in-built API in eclipse that we can use to read CSV files. These all ways to read and write CSV files in Java are the simplest Core Java components.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In past articles, we studied how to read an excel file in Java. In this article, we will discuss how to read a CSV file in Java using different methods. The data is multiplying&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":79284,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[2962,2963],"class_list":["post-79261","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-java-read-csv","tag-read-csv-file-in-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Read CSV file in Java - TechVidvan<\/title>\n<meta name=\"description\" content=\"Learn how to read CSV file in java in different ways-Using scanner class,Bufferedreader class,Java String.split(), OpenCSV API. Learn how to create CSV file\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Read CSV file in Java - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Learn how to read CSV file in java in different ways-Using scanner class,Bufferedreader class,Java String.split(), OpenCSV API. Learn how to create CSV file\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-01T03:30:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/Read-CSV-File-in-java.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Read CSV file in Java - TechVidvan","description":"Learn how to read CSV file in java in different ways-Using scanner class,Bufferedreader class,Java String.split(), OpenCSV API. Learn how to create CSV file","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/","og_locale":"en_US","og_type":"article","og_title":"How to Read CSV file in Java - TechVidvan","og_description":"Learn how to read CSV file in java in different ways-Using scanner class,Bufferedreader class,Java String.split(), OpenCSV API. Learn how to create CSV file","og_url":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2020-07-01T03:30:09+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/Read-CSV-File-in-java.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"How to Read CSV file in Java","datePublished":"2020-07-01T03:30:09+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/"},"wordCount":939,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/Read-CSV-File-in-java.jpg","keywords":["java read csv","Read CSV file in Java"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/","url":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/","name":"How to Read CSV file in Java - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/Read-CSV-File-in-java.jpg","datePublished":"2020-07-01T03:30:09+00:00","description":"Learn how to read CSV file in java in different ways-Using scanner class,Bufferedreader class,Java String.split(), OpenCSV API. Learn how to create CSV file","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/Read-CSV-File-in-java.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/Read-CSV-File-in-java.jpg","width":1200,"height":628,"caption":"Read CSV File in java"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/read-csv-file-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"How to Read CSV file in Java"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/79261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=79261"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/79261\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/79284"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=79261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=79261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=79261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}