An Interest In:
Web News this Week
- April 29, 2024
- April 28, 2024
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
April 29, 2023 07:51 am GMT
Original Link: https://dev.to/realnamehidden1_61/how-to-convert-array-to-arraylist-in-java-355j
how to convert array to arraylist in java
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); } }
Original Link: https://dev.to/realnamehidden1_61/how-to-convert-array-to-arraylist-in-java-355j
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To