Dear programmers,
how can I create a new List?
error: java.util.List is abstract; cannot be instantiated
I know that it means, that I can't create an instance like default. But what does abstract mean and how do I have to handle it? German answers are welcome, too.
import greenfoot.*; import java.io.Serializable; import java.util.*; /** * not finished */ public class Save implements Serializable { private List<Object>files; private static final String obPath = "CCE_ProjectFiles_Objects", nmPath = "CCE_PojectFiles_Names"; private String name; public Save(String name){ this.name = name; files = new List(); } public void addFile(Object file){ files.add(file); } public List getFiles(){ return files; } public static String getObjectFilePath(){ return obPath; } public static String getNameFilePath(){ return nmPath; } public void deleteFile(Object delete){ files.remove(delete); } public void save(){ Serialization.serialize(this, name); } }