for explanation watch the video
import java.util.*;
import java.lang.*;
class Demo{
public static void main(String[] args){
Integer[] arr = {1,2,3,4,5};
//List<Integer> al = new ArrayList<>(Arrays.asList(3,4,5,6));
//al.add(45);
List<Integer> al = new ArrayList<>(Arrays.asList(arr));
System.out.println(al);
}
}
Top comments (0)