Method Arrays.asList(...) takes array as an argument and returns a List containing elements of that array. The method returns an instance of Arrays.ArrayList and this object adapts the array to the List interface.
Read more: Adapter pattern
This method is also a factory method for List.
Войдите чтобы поставить Нравится
Войдите чтобы прокомментировать