How Is Arraysaslist Different Than The Standard Way Of #686
How is Arrays.asList() different than the standard way of initialising List?
This multiple choice question (MCQ) is related to the book/course gs gs128 Java. It can also be found in gs gs128 Java Util Collections Framework - Java List - Quiz No.1.
How is Arrays.asList() different than the standard way of initialising List?
Both are same
Arrays.asList() throws compilation error
Arrays.asList() returns a fixed length list and doesn’t allow to add or remove elements
We cannot access the list returned using Arrays.asList()