Answers for "Lists inside lists in java"

6

Lists inside lists in java

public class GuiTest {

	
	public static void main(String[] args) {
		List<List<Integer>> MainList = new ArrayList<List<Integer>>();
		Random NewRandomNumber = new Random();
		
		for (int i = 0; i < 10; i++) {
			List<Integer> SecondList = new ArrayList<Integer>();
			MainList.add(SecondList);
			for (int i2 = 0; i2 < 10; i2++) {
				SecondList.add(NewRandomNumber.nextInt(6));
			}
		}
Posted by: Guest on September-12-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language