ArrayToList.java
Convert String Array Object to String List Object Java
In this tutorial, We will show you How to convert String Array Object to String List Object Java. The program is tested and output is shared in the same post.
package com.dineshkrish; import java.util.Arrays; import java.util.List; public class ArrayToList { public static void main(String[] args) { String[] strArray = { "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten" }; // Converting Array Object to List Object List<String> strList = Arrays.asList(strArray); // Printing Converted List Object System.out.println(strList); } }
Output
——————–
[One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten]
More from my site

Hello, folks, I am a founder of idineshkrishnan.com. I love open source technologies, If you find my tutorials are useful, please consider making donations to these charities.
No responses yet