Accenture Accenture Primer Practice Question
import java.util.ArrayList; import java.util.List; class TestMain{Answer options
A
public static void main(String[] args){
B
//INSERT LIST DECLARATION HERE
C
for(int i=0;i<=5;i++){
D
List<Integer> row=new ArrayList<Integer>();
E
for(int j=0;j<=5;j++)
F
row.add(i*j);
G
db.add(row);
H
for(List<Integer>row:db)
I
System.out.println(row); }
J
List<List<Integer>>db= new ArrayList<List<List<Integer>>();
Correct answer: List<List<Integer>>db= new ArrayList<List<List<Integer>>();
Explanation
The source marks the correct answer as: List<List<Integer>>db= new ArrayList<List<List<Integer>>();.