FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 215 Ask New Question


I want to create an ArrayList and assign some basic values into it. Is there any one liner solution available for this in Java?

On By


1 Answer


You can use the static method asList from java.util.Arrays class

List<String> colors = Arrays.asList("Red", "Green", "Blue");
On By


Answer This Question


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News