What is the correct syntax for changing the value of a specified row/column in an ArrayList?
ArrayList matrix = new ArrayList();
matrix.add( new ArrayList() ) ;
((ArrayList)matrix.get(0)).add("row 0 col 0");
((ArrayList)matrix.get(0)).add("row 0 col 1");
((ArrayList)matrix.get(0)).add("row 0 col 2");
matrix.add( new ArrayList() ) ;
((ArrayList)matrix.get(0)).add("row 1 col 0");
((ArrayList)matrix.get(0)).add("row 1 col 1");
((ArrayList)matrix.get(0)).add("row 1 col 2");
matrix.add( new ArrayList() ) ;
((ArrayList)matrix.get(0)).add("row 2 col 0");
((ArrayList)matrix.get(0)).add("row 2 col 1");
((ArrayList)matrix.get(0)).add("row 2 col 2");
// HELP WITH SYNTAX
matrix.set(2,2,"hello") ;
System.out.println( (String)((ArrayList)matrix.get(2)).get(2) ) ;