Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception in parse method of opencsv

 
Abhishek Mish
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am using openCsv to bind the csv content to java bean object.
Below is the code snippet,



Above code works fine if my bean class as below



But the problem if setCode of my bean class accept any other datatype other than String. If the getters/setters are changed as below



Then it throws exception while parsing csv file, does that mean it will work only for strings.

Thanks in Advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic