ListUtils#ofList method simply delegates the creation of a list to Arrays.asList(Object...) method, as code:
public static <E> List<E> ofList(E... elements) {
return asList(elements);
}
Actual, the returned list is not an immutable instance, it could change the element content at the specified index, like :
List<String> values = ofList("1","2");
values.set(0,"-1"); // values = [ "-1" , "2" ]
ListUtils#ofList method simply delegates the creation of a list to Arrays.asList(Object...) method, as code:
Actual, the returned list is not an immutable instance, it could change the element content at the specified index, like :