Re: Beginner CSV error



On 30 Jan 2006 12:17:13 -0800, "Rob" <rstupplebeen@xxxxxxxxxxx> wrote,
quoted or indirectly quoted someone who said :

>unreported exception java.io.FileNotFoundException; must be caught or
>declared to be thrown
>
>String[][] data = (new CSVParser(new
>FileReader("test.csv"))).getAllValues();
>Note: .\com\Ostermiller\util\CSVParser.java uses unchecked or unsafe
>operations.

Your FileReader could blow up with a FileNotFoundException. You need
to to catch that or at least put a throws on main to let Java deal
with it.

His code was written to work prior to JDK 1.5, thus Javac will
complain about it not using 1.5 generics. It is nothing to worry
about.

you could modify his code to generify it.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.



Relevant Pages

  • Re: Can Generics Implement Mix-Ins?
    ... inherit its fields and methods. ... Generics are used typically when you have a collection of some other ... class or one class manipulates objects of some other classes.. ... http://mindprod.com Java custom programming, consulting and coaching. ...
    (comp.lang.java.help)
  • Re: tutorial on generics and threads and io
    ... Angelika did a great job. ... Generics only began to make sense when I ... http://mindprod.com Java custom programming, consulting and coaching. ...
    (comp.lang.java.programmer)