|
CSVReader csvReader = new CSVReader(new FileReader(
RegistrationData.class.getResource("/regdata.csv").getPath()));
When i used the above syntax, system throwed NUll pointer exception.
I hardcoded the path, then it worked.
CSVReader csvReader = new CSVReader(new FileReader("C://Documents and Settings/user qq/workspace/seleniumtests/src/main/resources/regdata.csv");
Can you please explain why the above syntax throwed null pointer exception.?
|