i have a file that has a lot of data. In this file i don't want to write something but i want to write that data of the file in my array list full of objects. So far i have manage to write only this code:
try{
FileInputStream fis = new FileInputStream("data.csv");
ObjectInputStream ois = new ObjectInputStream(fis);
ArrayList<Hotell> part_5= (ArrayList<Hotell>) ois.readObject();
System.out.println(part_5);
ois.close();
}catch(NumberFormatException ex){}
But when i am going to excute the programm nothing appears
In the file i hava fields like id, name of hotel , stars
I think BufferedReader is okey to use it but i don't know how because i want to save my file into arraylist full of objects