Jesper de Jong wrote:The stack trace tells you that a NullPointerException occurs in the constructor of StringTokenizer. The API documentation for the constructor of StringTokenizer says:
public StringTokenizer(String str, String delim)
...
Throws: NullPointerException - if str is null
Most likely you are passing null to the constructor of StringTokenizer.
that what i did here:
String FileName="C:/Users/Desktop/file.csv";
try{
BufferedReader read = new BufferedReader (new FileReader(FileName));
StringTokenizer str= null;
int space=0, TokenN=0;
while ((FileName = read.readLine())!=null);
{
space++;
str = new StringTokenizer(FileName,",");
while (str.hasMoreTokens())
{.....
still get the error