Skip to content
Java List and ArrayList
Profile icon

Hi guys,
is there any difference between these two ways?

List wordlist = new ArrayList <> ();


ArrayList wordlist = new ArrayList ();

You are viewing a single comment. View All
Answered by hellooneplus [earned 5 cycles]
View Answer
Profile icon

thanks, but in the first example i still don't understand why the declaration type is List and the implementation is ArrayList<>. This is a list or an arrayList?