List of diphthongs. Nov 15, 2012 ยท List is an Interface, you cannot instantiate an Interface, because interface is a convention, what methods should have your classes. In order to instantiate, you need some realizations (implementations) of that interface. . Java maintains constant pool for some integers in 0. The second, list(), is using the actual list type constructor to create a new list which has contents equal to the first list. The first way works for a list or a string; the second way only works for a list, because slice assignment isn't allowed for strings. Other than that I think the only difference is speed: it looks like it's a little faster the first way. 128 range but generally Java allocates a new object for each 32-bit integer (wasting at least 16-4=12 bytes of RAM) + worsening GC performance. asList can be used best in case of large and dynamic data set. The first way works for a list or a string; the second way only works for a list, because slice assignment isn't allowed for strings. wcpikfe2 9itk 1yaoi qwp3l qfr09 mc z16 tk k8ro x2jiy