aslist
asList, commonly encountered as Arrays.asList in the Java standard library, is a static generic method in java.util.Arrays. It returns a List<T> that is backed by a given array, providing a convenient way to use the List interface without copying elements.
The list produced by asList has a fixed size equal to the length of the underlying array.
A common pitfall involves primitive arrays. When a primitive array is passed, asList treats it as a
Use cases for asList include adapting a fixed-size array to APIs that require a List without copying