i am trying to create and object ExerciseLib with the following java code, and then call a method on the object to print a list:
ExerciseLib entry = new ExerciseLib();
out.println(entry.getEmploees("http://ism.dmst.aueb.gr/ismgroup100/emploees.csv");
the ExerciseLib class is the following:
public class ExerciseLib {
private final String delimiter = ",";
public ExerciseLib() {
}
public List<Emploee> getEmploees(String csvURL) throws Exception {
try {
URL csv = new URL(csvURL);
List<Emploee> emploees = new ArrayList<Emploee>();
BufferedReader in = new BufferedReader(new InputStreamReader(csv.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
String[] fields = inputLine.split(delimiter);
emploees.add(new Emploee(Integer.parseInt(fields[0]), fields[1], fields[2], fields[3], Integer.parseInt(fields[4]), Double.parseDouble(fields[5])));
}
in.close();
return emploees;
} catch (FileNotFoundException e) {
throw new Exception("Could not find csv file: " + e.getMessage());
} catch (Exception e) {
throw new Exception("Error: " + e.getMessage());
}
}// End of getEmploees
}// End of class
I can compile the file, but when i run javac on cmd I get "cannot find symbol" for ExerciseLib. I am almost100% sure that i have not made a typing error, so what is up?? I must mention that the class ExerciseLib is in a package that i do not know if and howi must import.