in this Java Collections framework video, I'm happy to share with you how to initialize a List collection with some default elements in just one line, using the Arrays.asList() and List.of() methods.
It will make create and initialize List in much more compact and convenient way. You will also learn how to initialize an ArrayList that is modifiable.