### Question:
NQueen { public List<List<String>> solveNQueens(int n) { List<List<String>> results = new ArrayList<>(); if (n <= 0) { return results; } search(results, new ArrayList<Integer>(), n); return results; }  List<List<String>> solveNQueens(int n);  }### Answer:
@Test public void test(){ int n = 8; NQueen nQueen = new NQueen(); List<List<String>> queenList = nQueen.solveNQueens(n); int index = 0; for(List<String> strList : queenList){ System.out.println("index = " + index++); for(String str : strList){ System.out.println(str); } } }