I noticed that in tutorials for mapping columns in Hibernate, somebody initialize List(Set). What is difference when I don't use "new" and new ArrayList()
? Can I use new LinkedList(
) too? And what about Set? Is it same like in List? And is there same difference across versions of Hibernate?
@Entiy
public class Student implements Serializable{
private List<String> subjects1;
private List<String> subjects2 = new ArrayList();
}
or
@Entiy
public class Student implements Serializable{
private Set<String> subjects1;
private Set<String> subjects2 = new HashSet();
}