Java List and ArrayList
is there any difference between these two ways?
List wordlist = new ArrayList <> ();
ArrayList wordlist = new ArrayList ();
the list in java is not dynamic, Meaning it can hold only a certain amount on information, based on what you put. So whatever value you want it to hold, that's all it can. While the array list is a dynamic. You don't have to specify anything. You can add how much you want. the internal process just makes more, and more space foryou to add unlimited.