Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

list of lists java


import java.util.ArrayList;
import java.util.List;
 
public class main {
    public static void main(String[] args){
        List<List<Integer>> lists = new ArrayList<List<Integer>>();
        List<Integer> num1 = Arrays.asList(new Integer[] {1,2,3,4});
        List<Integer> num2 = Arrays.asList(new Integer[] {7,9,3,4});
        lists.add(num1);
        lists.add(num2);
        System.out.println(lists);
    }
}
Source by www.techiedelight.com #
 
PREVIOUS NEXT
Tagged: #list #lists #java
ADD COMMENT
Topic
Name
2+9 =